Merge pull request #1 from Ethan-Chin/fix-flaky

Fixed a flaky test
This commit is contained in:
Ethan Chen 2024-10-06 16:59:03 -05:00 committed by GitHub
commit d7dd4a2481
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -439,12 +439,15 @@ public class MovingAverageIterableTest extends InitializedNullHandlingTest
Assert.assertTrue(iter.hasNext()); Assert.assertTrue(iter.hasNext());
result = iter.next(); result = iter.next();
Assert.assertEquals("u", (result.getDimension("gender")).get(0)); String genderMissingFirst = (result.getDimension("gender")).get(0);
Assert.assertTrue("u".equals(genderMissingFirst) || "f".equals(genderMissingFirst));
Assert.assertEquals(JAN_2, (result.getTimestamp())); Assert.assertEquals(JAN_2, (result.getTimestamp()));
Assert.assertTrue(iter.hasNext()); Assert.assertTrue(iter.hasNext());
result = iter.next(); result = iter.next();
Assert.assertEquals("f", (result.getDimension("gender")).get(0)); String genderMissingSecond = (result.getDimension("gender")).get(0);
Assert.assertTrue("u".equals(genderMissingSecond) || "f".equals(genderMissingSecond));
Assert.assertFalse(genderMissingSecond.equals(genderMissingFirst));
Assert.assertEquals(JAN_2, (result.getTimestamp())); Assert.assertEquals(JAN_2, (result.getTimestamp()));
Assert.assertFalse(iter.hasNext()); Assert.assertFalse(iter.hasNext());