From bcea9a06abbaf460e020667c5c8f75dfaac73d7a Mon Sep 17 00:00:00 2001 From: pranav-super Date: Mon, 21 Oct 2024 11:47:12 -0700 Subject: [PATCH] add length assertion --- .../nasa/jpl/aerie/database/ExternalEventTests.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 92159312ad..f73d945bb2 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 @@ -418,6 +418,7 @@ void testSparseCoverage() throws SQLException { "2024-01-02 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -496,6 +497,7 @@ void testForwardOverlap() throws SQLException { "2024-01-02 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -574,6 +576,7 @@ void testBackwardOverlap() throws SQLException { "2024-01-02 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -676,6 +679,7 @@ void testBackground() throws SQLException { "2024-01-03 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -872,6 +876,7 @@ void testAmalgamation() throws SQLException { "2024-01-07 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } } @@ -944,6 +949,7 @@ void rule1_solitary() throws SQLException { "2024-01-01 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -1037,6 +1043,7 @@ void rule1_bookended() throws SQLException { "2024-01-03 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -1121,6 +1128,7 @@ void rule2() throws SQLException { "2024-01-02 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -1207,6 +1215,7 @@ void rule3_basic() throws SQLException { "2024-01-02 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -1357,6 +1366,7 @@ void rule4() throws SQLException { "2024-01-03 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } } @@ -1483,6 +1493,7 @@ void nEventsAtSameTime() throws SQLException { "2024-01-01 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); } @@ -2063,6 +2074,7 @@ void superDerivedEvents() throws SQLException { "2024-01-21 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); // verify for a given DERIVATION_GROUP expected keys are correct, no overlap inside DERIVATION_GROUP @@ -2141,6 +2153,7 @@ void superDerivedEvents() throws SQLException { "2024-01-18 00:00:00+00" ) ); + assertEquals(expectedResults.size(), results.size()); assertTrue(results.containsAll(expectedResults)); }