Skip to content

Commit 6f131b5

Browse files
authored
Merge pull request #1669 from brendandburns/versions
Revise the Java versions we test to LTS + latest non-LTS version.
2 parents f2d8b5f + cf9b6ac commit 6f131b5

File tree

4 files changed

+95
-26
lines changed

4 files changed

+95
-26
lines changed

.github/workflows/maven.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
strategy:
2929
matrix:
3030
# test against latest update of each major Java version, as well as specific updates of LTS versions:
31-
java: [ 8.0.x, 9.0.x, 10.0.x, 11.0.x, 12.0.x, 13.0.x ]
31+
java: [ 8.0.x, 9.0.x, 10.0.x, 11.0.x, 12.0.x, 16.0.x ]
3232
steps:
3333
- uses: actions/[email protected]
3434
- name: Setup Java

spring/pom.xml

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,18 +107,52 @@
107107
<target>8</target>
108108
</configuration>
109109
</plugin>
110-
<plugin>
111-
<groupId>org.apache.maven.plugins</groupId>
112-
<artifactId>maven-surefire-plugin</artifactId>
113-
<configuration>
114-
<argLine>@{argLine} -Xms512m -Xmx1500m</argLine>
115-
<parallel>methods</parallel>
116-
<perCoreThreadCount>false</perCoreThreadCount>
117-
<threadCount>1</threadCount>
118-
<forkCount>1</forkCount>
119-
<reuseForks>false</reuseForks>
120-
</configuration>
121-
</plugin>
122110
</plugins>
123111
</build>
112+
<profiles>
113+
<profile>
114+
<id>surefire-newerJava</id>
115+
<activation>
116+
<jdk>(1.8,)</jdk>
117+
</activation>
118+
<build>
119+
<plugins>
120+
<plugin>
121+
<groupId>org.apache.maven.plugins</groupId>
122+
<artifactId>maven-surefire-plugin</artifactId>
123+
<configuration>
124+
<argLine>@{argLine} -Xms512m -Xmx1500m --illegal-access=warn</argLine>
125+
<parallel>methods</parallel>
126+
<perCoreThreadCount>false</perCoreThreadCount>
127+
<threadCount>1</threadCount>
128+
<forkCount>1</forkCount>
129+
<reuseForks>false</reuseForks>
130+
</configuration>
131+
</plugin>
132+
</plugins>
133+
</build>
134+
</profile>
135+
<profile>
136+
<id>surefire-java8</id>
137+
<activation>
138+
<jdk>1.8</jdk>
139+
</activation>
140+
<build>
141+
<plugins>
142+
<plugin>
143+
<groupId>org.apache.maven.plugins</groupId>
144+
<artifactId>maven-surefire-plugin</artifactId>
145+
<configuration>
146+
<argLine>@{argLine} -Xms512m -Xmx1500m</argLine>
147+
<parallel>methods</parallel>
148+
<perCoreThreadCount>false</perCoreThreadCount>
149+
<threadCount>1</threadCount>
150+
<forkCount>1</forkCount>
151+
<reuseForks>false</reuseForks>
152+
</configuration>
153+
</plugin>
154+
</plugins>
155+
</build>
156+
</profile>
157+
</profiles>
124158
</project>

util/pom.xml

Lines changed: 46 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -152,18 +152,52 @@
152152
<target>8</target>
153153
</configuration>
154154
</plugin>
155-
<plugin>
156-
<groupId>org.apache.maven.plugins</groupId>
157-
<artifactId>maven-surefire-plugin</artifactId>
158-
<configuration>
159-
<argLine>@{argLine} -Xms512m -Xmx1500m</argLine>
160-
<parallel>methods</parallel>
161-
<perCoreThreadCount>false</perCoreThreadCount>
162-
<threadCount>1</threadCount>
163-
<forkCount>1</forkCount>
164-
<reuseForks>false</reuseForks>
165-
</configuration>
166-
</plugin>
167155
</plugins>
168156
</build>
157+
<profiles>
158+
<profile>
159+
<id>surefire-newerJava</id>
160+
<activation>
161+
<jdk>(1.8,)</jdk>
162+
</activation>
163+
<build>
164+
<plugins>
165+
<plugin>
166+
<groupId>org.apache.maven.plugins</groupId>
167+
<artifactId>maven-surefire-plugin</artifactId>
168+
<configuration>
169+
<argLine>@{argLine} -Xms512m -Xmx1500m --illegal-access=warn</argLine>
170+
<parallel>methods</parallel>
171+
<perCoreThreadCount>false</perCoreThreadCount>
172+
<threadCount>1</threadCount>
173+
<forkCount>1</forkCount>
174+
<reuseForks>false</reuseForks>
175+
</configuration>
176+
</plugin>
177+
</plugins>
178+
</build>
179+
</profile>
180+
<profile>
181+
<id>surefire-java8</id>
182+
<activation>
183+
<jdk>1.8</jdk>
184+
</activation>
185+
<build>
186+
<plugins>
187+
<plugin>
188+
<groupId>org.apache.maven.plugins</groupId>
189+
<artifactId>maven-surefire-plugin</artifactId>
190+
<configuration>
191+
<argLine>@{argLine} -Xms512m -Xmx1500m</argLine>
192+
<parallel>methods</parallel>
193+
<perCoreThreadCount>false</perCoreThreadCount>
194+
<threadCount>1</threadCount>
195+
<forkCount>1</forkCount>
196+
<reuseForks>false</reuseForks>
197+
</configuration>
198+
</plugin>
199+
</plugins>
200+
</build>
201+
</profile>
202+
</profiles>
169203
</project>

util/src/test/java/io/kubernetes/client/util/generic/GenericKubernetesApiTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import io.kubernetes.client.custom.V1Patch;
2121
import io.kubernetes.client.openapi.ApiClient;
2222
import io.kubernetes.client.openapi.ApiException;
23+
import io.kubernetes.client.openapi.JSON;
2324
import io.kubernetes.client.openapi.models.V1Job;
2425
import io.kubernetes.client.openapi.models.V1JobList;
2526
import io.kubernetes.client.openapi.models.V1JobStatus;
@@ -161,7 +162,7 @@ public void updateStatusNamespacedJobReturningObject() {
161162

162163
stubFor(
163164
patch(urlEqualTo("/apis/batch/v1/namespaces/default/jobs/foo1/status"))
164-
.willReturn(aResponse().withStatus(200).withBody(new Gson().toJson(foo1))));
165+
.willReturn(aResponse().withStatus(200).withBody(new JSON().serialize(foo1))));
165166
KubernetesApiResponse<V1Job> jobListResp = jobClient.updateStatus(foo1, t -> t.getStatus());
166167
assertTrue(jobListResp.isSuccess());
167168
assertEquals(foo1, jobListResp.getObject());

0 commit comments

Comments
 (0)