Test failure
mvn clean install -Pqulice fails on eo-maven-plugin. I didn't change any code, it's master branch
OS: MacOS 10.13.6 JDK: java version "18.0.2" 2022-07-19
[ERROR] Failures:
[ERROR] TranspileMojoTest.recompileIfModified:108
Expected: a value greater than <1663426214000L>
but: <1663426214000L> was equal to <1663426214000L>
[INFO]
[ERROR] Tests run: 72, Failures: 1, Errors: 0, Skipped: 6
@mximp please, take a look
@kerelape Can you please add the log of the TranspileMojoTest.recompileIfModified test: any errors or warnings in it?
I didn't manage to reproduce it with my MacOS/JDK18
@mximp log.txt
@kerelape It looks like environmental issue specific to your env.
There is a code in TranspileMojoTest.recompileIfModified:
final long before = java.toFile().lastModified();
Assertions.assertTrue(src.toFile().setLastModified(before + 1));
new Moja<>(TranspileMojo.class)
.with("project", new MavenProjectStub())
.with("targetDir", target.toFile())
.with("generatedDir", generated.toFile())
.with("foreign", foreign.toFile())
.with("foreignFormat", "csv")
.with("transpiled", transpiled.toFile())
.with("transpiledFormat", "csv")
.execute();
MatcherAssert.assertThat(
java.toFile().lastModified(),
Matchers.greaterThan(before)
);
Could you please try to debug/log the lastModified for src and java files right after row Assertions.assertTrue(src.toFile().setLastModified(before + 1)); as well as after .execute()
I can see in you log:
[INFO] org.eolang.maven.TranspileMojo: XMIR /var/folders/yk/k0kgbxqj7h32y7n8gfy818rm0000gn/T/junit16956724664881979618/target/03-optimize/foo/src.xmir (foo.src) were already transpiled to /var/folders/yk/k0kgbxqj7h32y7n8gfy818rm0000gn/T/junit16956724664881979618/target/06-transpile/foo/src.xmir
which means that for some reason setLastModified() call didn't succeed for src.
Can you run the test separately from within IntelliJ? Does it pass?
@kerelape any luck?
@mximp @kerelape still a bug or we can close this one?
@yegor256 @mximp unfortunately I can't verify it, since I'm no longer running macOS
@mximp I guess we can close this one, since the build is clean for me and I'm with Java 19