diff --git a/db-tests/src/test/java/gov/nasa/jpl/aerie/database/ExternalEventTests.java b/db-tests/src/test/java/gov/nasa/jpl/aerie/database/ExternalEventTests.java index 9c053a2eb8..3b1116c467 100644 --- a/db-tests/src/test/java/gov/nasa/jpl/aerie/database/ExternalEventTests.java +++ b/db-tests/src/test/java/gov/nasa/jpl/aerie/database/ExternalEventTests.java @@ -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; @@ -209,7 +208,8 @@ protected List 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()) { @@ -232,8 +232,9 @@ protected List 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. * @@ -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(