save-cli icon indicating copy to clipboard operation
save-cli copied to clipboard

ProcessBuilder has some flaky tests

Open petertrr opened this issue 4 years ago • 2 comments

On windows (on GH actions) the test check stdout with redirection()[jvm] fails:

org.opentest4j.AssertionFailedError: expected: <[The system cannot find the path specified.]> but was: <[The system cannot find the path specified., The process tried to write to a nonexistent pipe.]>
	at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
	at org.junit.jupiter.api.AssertionUtils.failNotEqual(AssertionUtils.java:62)
	at org.junit.jupiter.api.AssertEquals.assertEquals(AssertEquals.java:182)
	at org.junit.jupiter.api.Assertions.assertEquals(Assertions.java:1135)
	at kotlin.test.junit5.JUnit5Asserter.assertEquals(JUnitSupport.kt:32)
	at kotlin.test.AssertionsKt__AssertionsKt.assertEquals(Assertions.kt:63)
	at kotlin.test.AssertionsKt.assertEquals(Unknown Source)
	at kotlin.test.AssertionsKt__AssertionsKt.assertEquals$default(Assertions.kt:62)
	at kotlin.test.AssertionsKt.assertEquals$default(Unknown Source)

has been noticed for https://github.com/cqfn/save/pull/77/commits/e9157ada02998ad4d1f4ab847cc8b9efd8294d10, but the test passes after restart. Probably, needs some investigation, if it keeps occurring in the future.

petertrr avatar May 20 '21 15:05 petertrr

We also should focus on platform, which fails. For now it jvm, and it probably goes from ProcessBuilder from Java. In native we have explicit check for unsuccessful pipe creation, and I think it shouldn't be reproduced in native for this reason.

kgevorkyan avatar May 20 '21 15:05 kgevorkyan

The same error for this test appeared in mingwX64 on Windows, the reason still unclear, after restart test passed

kgevorkyan avatar Jun 09 '21 11:06 kgevorkyan