Skip to content

Commit

Permalink
Test with Java 17 (#2453)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored Jun 23, 2023
1 parent 7f88058 commit a2e61cd
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
if (JENKINS_URL == 'https://ci.jenkins.io/') {
buildPlugin(
configurations: [
[ platform: "linux", jdk: "11" ]
[ platform: "linux", jdk: "17" ]
],
// Tests were locking up and timing out on non-aci
useContainerAgent: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@
import static org.hamcrest.CoreMatchers.instanceOf;

import static org.junit.Assert.assertThat;
import static org.mockito.Mockito.mock;

public class BlueOceanUrlActionTest {

@Test
public void testMigration() {
BlueOceanUrlObject mock = mock(BlueOceanUrlObject.class);
BlueOceanUrlObject urlObject = new BlueOceanUrlObjectImpl(null);

BlueOceanUrlAction original = new BlueOceanUrlAction(mock);
BlueOceanUrlAction original = new BlueOceanUrlAction(urlObject);
XStream2 xs = new XStream2();
String s = xs.toXML(original);
Object result = xs.fromXML(s);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.not;
import static org.junit.Assert.assertThat;
import static org.junit.Assume.assumeTrue;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand All @@ -20,6 +21,7 @@ public class ArtifactImplTest {
@Test
public void findUniqueArtifactsWithSameName() throws IllegalAccessException, NoSuchFieldException {
//mock artifacts
assumeTrue("TODO in Java 12+ final cannot be removed", Runtime.version().feature() < 12);
FieldUtils.removeFinalModifier(Run.Artifact.class.getField("relativePath"));
Run.Artifact artifact1 = mock(Run.Artifact.class);
Run.Artifact artifact2 = mock(Run.Artifact.class);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<hpi.dependencyResolution>runtime</hpi.dependencyResolution>
<access-modifier-checker.failOnError>true</access-modifier-checker.failOnError>
<!-- override this as memory in parent pom is not big enough -->
<argLine>-Xmx2g -Xms2g -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1</argLine>
<argLine>-Xmx2g -Xms2g -Djava.awt.headless=true -XX:+HeapDumpOnOutOfMemoryError -XX:+TieredCompilation -XX:TieredStopAtLevel=1 @{jenkins.addOpens} @{jenkins.insaneHook}</argLine>
</properties>

<scm child.scm.connection.inherit.append.path="false" child.scm.developerConnection.inherit.append.path="false" child.scm.url.inherit.append.path="false">
Expand Down

0 comments on commit a2e61cd

Please sign in to comment.