Skip to content

Commit 550b6b3

Browse files
committed
JIRA:GRIF-315 upgrade to httpclient5 v3
1 parent 5d667a6 commit 550b6b3

File tree

3 files changed

+32
-29
lines changed

3 files changed

+32
-29
lines changed

gooddata-java/src/test/java/com/gooddata/sdk/service/util/JettyCompatibleUrlEncoderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ public void testPollHandlerITCompatibility() {
6363
// Verify key transformations occurred
6464
assertFalse(jettyExpected.contains("%2B"), "Plus signs should be decoded");
6565
assertFalse(jettyExpected.contains("%2F"), "Forward slashes should be decoded");
66-
assertFalse(jettyExpected.contains("%0A"), "Newlines should be decoded");
66+
assertTrue(jettyExpected.contains("%0A"), "Newlines should remain encoded per Jetty 8.1 behavior");
6767

68-
// Should contain actual characters instead
68+
// Should contain actual characters instead for selective decoding
6969
assertTrue(jettyExpected.contains("+"), "Should contain decoded plus signs");
7070
assertTrue(jettyExpected.contains("/"), "Should contain decoded forward slashes");
71-
assertTrue(jettyExpected.contains("\n"), "Should contain decoded newlines");
71+
assertFalse(jettyExpected.contains("\n"), "Should NOT contain decoded newlines (Jetty 8.1 leaves them encoded)");
7272
}
7373

7474
@Test

gooddata-java/src/test/java/com/gooddata/sdk/service/util/ResponseErrorHandlerTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public void shouldName() throws Exception {
8686
final HttpHeaders headers = new HttpHeaders();
8787
when(response.getHeaders()).thenReturn(headers);
8888
when(response.getStatusText()).thenThrow(IOException.class);
89+
when(response.getStatusCode()).thenThrow(IOException.class);
8990
when(response.getRawStatusCode()).thenThrow(IOException.class);
9091

9192
final GoodDataRestException exc = assertException(response);

pom.xml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -101,30 +101,20 @@
101101
<plugin>
102102
<artifactId>maven-failsafe-plugin</artifactId>
103103
<version>${failsafe.version}</version>
104+
<!-- config and dependencies below needed to make running both Spock and TestNG tests -->
104105
<configuration>
105106
<threadCount>1</threadCount>
106-
<!-- Re-enable IT tests with improved Jetty dependency management -->
107-
<includes>
108-
<include>**/*IT.java</include>
109-
</includes>
110-
<!-- Exclude problematic tests if any -->
111-
<excludes>
112-
<!-- Add specific problematic tests here if needed -->
113-
<!-- <exclude>**/ProblematicIT.java</exclude> -->
114-
</excludes>
115-
<!-- Enhanced system properties for Jetty compatibility -->
116-
<systemPropertyVariables>
117-
<jetty.version.forced>true</jetty.version.forced>
118-
<org.eclipse.jetty.util.log.class>org.eclipse.jetty.util.log.StdErrLog</org.eclipse.jetty.util.log.class>
119-
<org.eclipse.jetty.LEVEL>WARN</org.eclipse.jetty.LEVEL>
120-
</systemPropertyVariables>
121107
</configuration>
122108
<dependencies>
123-
<!-- Use TestNG for IT tests instead of JUnit -->
109+
<dependency>
110+
<groupId>org.apache.maven.surefire</groupId>
111+
<artifactId>surefire-junit47</artifactId>
112+
<version>${surefire.version}</version>
113+
</dependency>
124114
<dependency>
125115
<groupId>org.apache.maven.surefire</groupId>
126116
<artifactId>surefire-testng</artifactId>
127-
<version>${failsafe.version}</version>
117+
<version>${surefire.version}</version>
128118
</dependency>
129119
</dependencies>
130120
</plugin>
@@ -205,21 +195,33 @@ LICENSE.txt file in the root directory of this source tree.</inlineHeader>
205195
</configuration>
206196
</plugin>
207197
<plugin>
208-
<!-- needed to make running both Spock and JUnit5 tests -->
198+
<!-- needed to make running both Spock and TestNG tests -->
209199
<groupId>org.apache.maven.plugins</groupId>
210200
<artifactId>maven-surefire-plugin</artifactId>
211201
<version>${surefire.version}</version>
212202
<configuration>
203+
<properties>
204+
<property>
205+
<name>junit</name>
206+
<value>false</value>
207+
</property>
208+
</properties>
213209
<threadCount>1</threadCount>
214-
<includes>
215-
<include>**/*Test.java</include>
216-
<include>**/*Spec.groovy</include>
217-
</includes>
218-
<excludes>
219-
<exclude>**/RetryableRestTemplateTest.java</exclude>
220-
</excludes>
221-
<argLine>--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED</argLine>
210+
<!-- Java 17 module access for Shazamcrest library -->
211+
<argLine>--add-opens java.base/java.time=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED</argLine>
222212
</configuration>
213+
<dependencies>
214+
<dependency>
215+
<groupId>org.apache.maven.surefire</groupId>
216+
<artifactId>surefire-junit47</artifactId>
217+
<version>${surefire.version}</version>
218+
</dependency>
219+
<dependency>
220+
<groupId>org.apache.maven.surefire</groupId>
221+
<artifactId>surefire-testng</artifactId>
222+
<version>${surefire.version}</version>
223+
</dependency>
224+
</dependencies>
223225
</plugin>
224226
</plugins>
225227
</build>

0 commit comments

Comments
 (0)