Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mpkorstanje committed Mar 22, 2024
1 parent cb30232 commit 9675ef5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions java/src/main/java/io/cucumber/junitxmlformatter/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
/**
* Given one Cucumber Message, find another.
* <p>
* This class is effectively a simple in memory database. It can be updated in
* real time through the {@link #update(Envelope)} method. Queries can be made
* while the test run is incomplete - and this will of-course return incomplete
* results.
* <p>
* It is safe to query and update concurrently.
*
* @see <a href=https://github.com/cucumber/messages?tab=readme-ov-file#message-overview>Cucumber Messages - Message Overview</a>
*/
Expand All @@ -61,6 +67,7 @@ class Query {
private TestRunFinished testRunFinished;

public List<TestCaseStarted> findAllTestCaseStarted() {
// Concurrency
return new ArrayList<>(testCaseStarted);
}

Expand Down Expand Up @@ -160,6 +167,7 @@ public List<TestStepFinished> findTestStepsFinishedBy(TestCaseStarted testCaseSt
requireNonNull(testCaseStarted);
List<TestStepFinished> testStepsFinished = testStepsFinishedByTestCaseStartedId.
getOrDefault(testCaseStarted.getId(), emptyList());
// Concurrency
return new ArrayList<>(testStepsFinished);
}

Expand Down

0 comments on commit 9675ef5

Please sign in to comment.