aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-11 17:57:58 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-03-11 17:57:58 +0700
commitf7d471f68281185566a3454dc6ac89cfa0c72f10 (patch)
tree524c997f26e48d8416b73b3f139cdbdb938e9e6a /tests
parent2bde9d992502006b3c8864920f34b9a106de8577 (diff)
downloadaspectj-f7d471f68281185566a3454dc6ac89cfa0c72f10.tar.gz
aspectj-f7d471f68281185566a3454dc6ac89cfa0c72f10.zip
Fix MultiProjectIncrementalTests.testAspectPath_pr265693, 2nd try
Do not assume a certain element order for tree nodes if there can be more than one. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests')
-rw-r--r--tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
index 968c37ae0..8e5db450f 100644
--- a/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
+++ b/tests/src/test/java/org/aspectj/systemtest/incremental/tools/MultiProjectIncrementalTests.java
@@ -1697,9 +1697,13 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
IProgramElement root = getModelFor(bug2).getHierarchy().getRoot();
IProgramElement binariesNode = getChild(root, "binaries");
assertNotNull(binariesNode);
- IProgramElement packageNode = binariesNode.getChildren().get(0);
- assertEquals("a.b.c", packageNode.getName());
+ IProgramElement packageNode = binariesNode.getChildren().stream()
+ .filter(programElement -> programElement.getName().equals("a.b.c"))
+ .findFirst()
+ .orElse(null);
+ assertNotNull(packageNode);
IProgramElement fileNode = packageNode.getChildren().get(0);
+ assertNotNull(fileNode);
assertEquals(IProgramElement.Kind.FILE, fileNode.getKind());
}
@@ -4015,4 +4019,4 @@ public class MultiProjectIncrementalTests extends AbstractMultiProjectIncrementa
}
}
-} \ No newline at end of file
+}