-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Type: BugIssues reporting and PRs fixing problemsIssues reporting and PRs fixing problems
Milestone
Description
org.terasology.gestalt.assets.module.autoreload.ModuleEnvironmentWatcherTest.test()
It sometimes passes, and sometimes on CI it does not
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:55)
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:40)
at org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:35)
at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:162)
at org.terasology.gestalt.assets.module.autoreload.ModuleEnvironmentWatcherTest.test(ModuleEnvironmentWatcherTest.java:91)
Lines 84 to 98 in a7968fe
| AssetType<Text, TextData> assetType = new AssetType<>(Text.class, new TextFactory()); | |
| watcher.register("text", subscriber, assetType); | |
| watcher.checkForChanges(); | |
| Files.createDirectories(tempDirectory.resolve("assets").resolve("text")); | |
| watcher.checkForChanges(); | |
| Files.createFile(tempDirectory.resolve("assets").resolve("text").resolve("test.txt")); | |
| SetMultimap<AssetType<?, ?>, ResourceUrn> changed = watcher.checkForChanges(); | |
| assertTrue(changed.containsEntry(assetType, new ResourceUrn(module.getId(), new Name("test.txt")))); | |
| try (Writer writer = Files.newBufferedWriter(tempDirectory.resolve("assets").resolve("text").resolve("test.txt"))) { | |
| writer.write("This is my text"); | |
| } | |
| changed = watcher.checkForChanges(); | |
| assertTrue(changed.containsEntry(assetType, new ResourceUrn(module.getId(), new Name("test.txt")))); | |
| FilesUtil.recursiveDelete(tempDirectory); | |
| watcher.checkForChanges(); |
Metadata
Metadata
Assignees
Labels
Type: BugIssues reporting and PRs fixing problemsIssues reporting and PRs fixing problems