Do not force SYNC
It might be preferrable from a consistency standpoint, but many CLI tests start failing when you force this. So, as the previous behaviour was not forcing the sync, this seems to show there could be unintended behavioural changes in effect. Possibly, we'll want to address this later, but as the main goal here was to make commit() atomic as much as possible, fixing this is probably another story anyway. Note: I was *never* able to reproduce those failures on my machine in a normal env dev. It was only visible in CI. I finally managed to make it reproducible (but still a bit randomly) by using Docker resource constraints, using something like this: * cd to jenkins local clone * `docker run -ti -v m2repo:/root/.m2/repository -v $PWD:/work -v ~/.m2/settings.xml:/root/.m2/settings.xml:ro -v ~/.m2/settings-security.xml:/root/.m2/settings-security.xml:ro --device-write-iops /dev/mapper/fedora-home:40 --device-read-iops /dev/mapper/fedora-home:40 --device-write-bps /dev/mapper/fedora-home:10m --device-read-bps /dev/mapper/fedora-home:10m maven:3.5.2-jdk-8 bash` * cd /work * `mvn clean install -Dtest=WaitNodeOfflineCommandTest,RunRangeCommandTest -Dfindbugs.skip=true -DfailIfNoTests=false -Dskip.npm=true` Failure example: ``` ERROR] Tests run: 6, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 55.68OfflineCommandTest [ERROR] waitNodeOfflineShouldSucceedOnDisconnectingNode(hudson.cli.WaitNodeOf <<< FAILURE! java.lang.AssertionError: Expected: <true> but: was <false> at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20) at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8) at hudson.cli.WaitNodeOfflineCommandTest.waitNodeOfflineShouldSucceedndTest.java:128) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorIm at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAc at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(Framew at org.junit.internal.runners.model.ReflectiveCallable.run(Reflective at org.junit.runners.model.FrameworkMethod.invokeExplosively(Framewor at org.junit.internal.runners.statements.InvokeMethod.evaluate(Invoke at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefor at org.jvnet.hudson.test.JenkinsRule$1.evaluate(JenkinsRule.java:542) at org.junit.internal.runners.statements.FailOnTimeout$CallableStatem at org.junit.internal.runners.statements.FailOnTimeout$CallableStatem at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.lang.Thread.run(Thread.java:748) [ERROR] waitNodeOfflineShouldSucceedOnDisconnectedNode(hudson.cli.WaitNodeOff <<< FAILURE! java.lang.AssertionError ```
Please register or sign in to comment