Skip to content

Commit

Permalink
testing dropoff
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdahlke committed Oct 18, 2024
1 parent de8d15e commit 2d3c32c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/emissary/output/DropOffUtilTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ void testGetEventDate() {
d.setParameter(EVENT_DATE, "2015-02-13 23:13:03");
d.setParameter(FILE_DATE, "2015-01-05 17:45:53");

Instant start = Instant.now(); // use this for relative comparison
long start = Instant.now().getEpochSecond() - 5; // use this for relative comparison

// hit on child EventDate
assertEquals("2015-02-13 23:13:03", TimeUtil.getDateAsISO8601(this.util.getEventDate(d, tld).toInstant()));
Expand All @@ -469,11 +469,11 @@ void testGetEventDate() {
// removing tld FILE_DATE should default to now as configured by default
tld.deleteParameter(FILE_DATE);
assertNotNull(this.util.getEventDate(d, tld));
System.out.println(start.getEpochSecond());
System.out.println("Start: " + start);
System.out.println(this.util.getEventDate(d, tld).toInstant().getEpochSecond());
System.out.println(start.getNano());
System.out.println(Instant.ofEpochSecond(start).getNano());
System.out.println(this.util.getEventDate(d, tld).toInstant().getNano());
assertTrue(this.util.getEventDate(d, tld).toInstant().compareTo(start) > 0);
assertTrue(this.util.getEventDate(d, tld).toInstant().compareTo(Instant.ofEpochSecond(start)) > 0);

// changing the configuration to not default to now should return null
Configurator cfg = new ServiceConfigGuide();
Expand Down

0 comments on commit 2d3c32c

Please sign in to comment.