Skip to content

Conversation

@jglick
Copy link
Member

@jglick jglick commented Dec 12, 2018

java.lang.AssertionError: expected:<[]> but was:<[Running Jenkins with Java 11 which is available in the preview mode only. A custom experimental update center will be used: https://updates.jenkins.io/temporary-experimental-java11/]>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at jenkins.model.StartupTest.noWarnings(StartupTest.java:45)

Note that this was marked as a flake because Surefire reruns the test (apparently in the same JVM despite reuse.forks=false) and the message is printed in a static initializer, which gets run just once.

I was actually looking around at other flakes I saw in #3804, one of which I fixed there (08d273f) because it happened enough to mark the build unstable. The others I saw were

java.lang.AssertionError: expected:<5> but was:<6>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at hudson.slaves.NodeProvisionerTest.loadSpike(NodeProvisionerTest.java:116)
java.lang.AssertionError: expected:<3> but was:<4>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at hudson.slaves.NodeProvisionerTest.baselineSlaveUsage(NodeProvisionerTest.java:134)

which are long-known flakes; in #2188 I let them be since rerunFailingTestsCount seems to take care of them, but perhaps these tests should just be disabled (if there is no obvious way to fix them).

java.lang.AssertionError: expected:<[]> but was:<[Running Jenkins with Java 11 which is available in the preview mode only. A custom experimental update center will be used: https://updates.jenkins.io/temporary-experimental-java11/]>
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:118)
	at org.junit.Assert.assertEquals(Assert.java:144)
	at jenkins.model.StartupTest.noWarnings(StartupTest.java:45)

Note that this was marked as a flake because Surefire reruns the test
(apparently in the same JVM despite reuse.forks=false)
and the message is printed in a static initializer, which gets run just once.
@oleg-nenashev oleg-nenashev added the java11 Java 11 support in Jenkins label Dec 12, 2018
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-0.5. I think it should be a warning while we are in the preview mode. It kinda duplicates the warning from Extras executable war, but IMHO here you are just adjust the behavior to the test. IMO we should ignore the warning for Java 11 and create a follow-up to remove it along with the experimental UC

@jglick
Copy link
Member Author

jglick commented Dec 13, 2018

I think it should be a warning while we are in the preview mode.

Subjective I guess. To me this feels like an information message. Nothing is necessarily broken.

@jglick
Copy link
Member Author

jglick commented Dec 13, 2018

we should ignore the warning for Java 11

Do you have a specific recommendation? I am loath to hard-code this message into StartupTest.

@jglick jglick requested a review from oleg-nenashev December 13, 2018 23:03
@oleg-nenashev
Copy link
Member

Do you have a specific recommendation?

Hardcoding looks like an acceptable option to me

@jglick
Copy link
Member Author

jglick commented Jan 3, 2019

I tend to disagree, and since we are at an impasse, I would rather leave the test broken (but rerun as a flake) for the duration of the preview mode than clutter the test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java11 Java 11 support in Jenkins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants