Skip to content

Commit

Permalink
fix(objectionary#3257): make cache older
Browse files Browse the repository at this point in the history
  • Loading branch information
maxonfjvipon committed Oct 29, 2024
1 parent 0372fec commit 4b24169
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions eo-maven-plugin/src/test/java/org/eolang/maven/ParseMojoTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
import com.yegor256.WeAreOnline;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.attribute.FileTime;
import java.util.Map;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
Expand Down Expand Up @@ -105,6 +108,16 @@ void parsesWithCache(@TempDir final Path temp) throws Exception {
base.relativize(target)
).apply(maven.programTojo().source(), target);
target.toFile().delete();
Files.setLastModifiedTime(
cache.resolve(
Paths
.get(ParseMojo.CACHE)
.resolve(FakeMaven.pluginVersion())
.resolve(hash.value())
.resolve("foo/x/main.xmir")
),
FileTime.fromMillis(System.currentTimeMillis() + 50_000)
);
final String actual = String.format(
"target/%s/foo/x/main.%s",
ParseMojo.DIR,
Expand Down

0 comments on commit 4b24169

Please sign in to comment.