Skip to content

Commit

Permalink
final test correction, unrelated and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pranav-super committed Oct 22, 2024
1 parent d07ff79 commit c40f05c
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

Expand Down Expand Up @@ -209,7 +208,8 @@ protected List<DerivedEvent> getDerivedEvents(String dg_name) throws SQLExceptio
var res = statement.executeQuery(
// language=sql
"""
SELECT * FROM merlin.derived_events %s;
SELECT * FROM merlin.derived_events
WHERE derivation_group_name = '%s';
""".formatted(dg_name)
);
while (res.next()) {
Expand All @@ -232,8 +232,9 @@ protected List<DerivedEvent> getDerivedEvents(String dg_name) throws SQLExceptio
* Repeated function that uploads a source and various events, as well as related types.
* Used in:
* - ExternalEventTests.java:
* + final duplication tests (duplicateSource, duplicatedDG)
* + duplicateSource
* + superDerivedEvents
* + associateDerivationGroupWithBasePlan
*
* Data here is based on the SSMO-MPS/mission-data-sandbox/derivation_test examples.
*
Expand Down Expand Up @@ -1646,7 +1647,7 @@ void superDerivedEvents() throws SQLException {
assertTrue(results.containsAll(expectedResults));

// verify for a given DERIVATION_GROUP expected keys are correct, no overlap inside DERIVATION_GROUP
results = getDerivedEvents("WHERE derivation_group_name = '%s' ORDER BY start_time;".formatted(dg2));
results = getDerivedEvents(dg2);

expectedResults = List.of(
new DerivedEvent(
Expand Down

0 comments on commit c40f05c

Please sign in to comment.