Skip to content

Commit

Permalink
Use java.time and not joda time
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Mar 5, 2024
1 parent 6216858 commit 9d1089d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
import org.opensearch.core.rest.RestStatus;
import org.opensearch.flowframework.exception.FlowFrameworkException;
import org.opensearch.test.OpenSearchTestCase;
import org.joda.time.Instant;

import java.io.IOException;
import java.time.Instant;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -63,8 +63,8 @@ public void testTemplate() throws IOException {
assertEquals(uiMetadata, template.getUiMetadata());
Workflow wf = template.workflows().get("workflow");
assertNotNull(wf);
assertTrue(template.createdTime() > Instant.now().minus(10_000).getMillis());
assertTrue(template.createdTime() < Instant.now().getMillis());
assertTrue(template.createdTime() > Instant.now().minusSeconds(10).toEpochMilli());
assertTrue(template.createdTime() < Instant.now().toEpochMilli());
assertEquals(template.createdTime(), template.lastUpdatedTime());
assertEquals(-1, template.lastProvisionedTime());
assertEquals("Workflow [userParams={key=value}, nodes=[A, B], edges=[A->B]]", wf.toString());
Expand All @@ -80,8 +80,8 @@ public void testTemplate() throws IOException {
assertEquals(uiMetadata, templateX.getUiMetadata());
Workflow wfX = templateX.workflows().get("workflow");
assertNotNull(wfX);
assertTrue(template.createdTime() > Instant.now().minus(10_000).getMillis());
assertTrue(template.createdTime() < Instant.now().getMillis());
assertTrue(template.createdTime() > Instant.now().minusSeconds(10).toEpochMilli());
assertTrue(template.createdTime() < Instant.now().toEpochMilli());
assertEquals(template.lastUpdatedTime(), template.createdTime());
assertEquals(-1, template.lastProvisionedTime());
assertEquals("Workflow [userParams={key=value}, nodes=[A, B], edges=[A->B]]", wfX.toString());
Expand Down

0 comments on commit 9d1089d

Please sign in to comment.