"Deflake" OutputArtifactConflictTest#testMultipleConflictErrors: there is no reason that //conflict:x should be inserted into the action-conflict-checking map before //conflict:_objs/x/foo.pic.o, even though historically it always is.
@@ -388,10 +388,12 @@ public class OutputArtifactConflictTest extends GoogleBuildIntegrationTestCase {
"file 'conflict/_objs/x/foo.pic.o' is generated by these conflicting actions:");
events.assertContainsError(
"/bin/x/y' (belonging to //x:y) is a prefix of output path 'blaze-out");
- // When two targets have conflicting artifacts, the first target named on the commandline "wins"
- // and is successfully built. All other targets fail analysis for conflicting with the first.
+ // When targets have conflicting artifacts, one of them "wins" and is successfully built. All
+ // other targets fail analysis for conflicting with the first.
+ assertThat(eventListener.failedTargetNames).containsAtLeast("//x:y", "//x/y:y");
+ assertThat(eventListener.failedTargetNames).hasSize(3);
assertThat(eventListener.failedTargetNames)
- .containsExactly("//x:y", "//x/y:y", "//conflict:_objs/x/foo.pic.o");
+ .containsAnyOf("//conflict:x", "//conflict:_objs/x/foo.pic.o");
}
@Test
