This repository was archived by the owner on Nov 22, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed
src/test/java/marquez/client Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change @@ -274,6 +274,32 @@ public class MarquezClientTest {
274274 DURATION ,
275275 RUN_ARGS );
276276
277+ private static final String RUN_ID = newRunId ();
278+ private static final Job JOB_WITH_LATEST_RUN =
279+ new Job (
280+ JOB_ID ,
281+ JOB_TYPE ,
282+ JOB_NAME ,
283+ CREATED_AT ,
284+ UPDATED_AT ,
285+ NAMESPACE_NAME ,
286+ INPUTS ,
287+ OUTPUTS ,
288+ LOCATION ,
289+ JOB_CONTEXT ,
290+ JOB_DESCRIPTION ,
291+ new Run (
292+ RUN_ID ,
293+ CREATED_AT ,
294+ UPDATED_AT ,
295+ NOMINAL_START_TIME ,
296+ NOMINAL_END_TIME ,
297+ RunState .NEW ,
298+ START_AT ,
299+ ENDED_AT ,
300+ DURATION ,
301+ RUN_ARGS ));
302+
277303 @ Rule public final MockitoRule rule = MockitoJUnit .rule ();
278304
279305 private MarquezUrl marquezUrl = MarquezUrl .create (DEFAULT_BASE_URL );
@@ -542,14 +568,14 @@ public void testCreateJobWithRunId() throws Exception {
542568 .location (LOCATION )
543569 .description (JOB_DESCRIPTION )
544570 .context (JOB_CONTEXT )
545- .runId (newRunId () )
571+ .runId (RUN_ID )
546572 .build ();
547573 final String metaAsJson = JsonGenerator .newJsonFor (meta );
548- final String jobAsJson = JsonGenerator .newJsonFor (JOB );
574+ final String jobAsJson = JsonGenerator .newJsonFor (JOB_WITH_LATEST_RUN );
549575 when (http .put (url , metaAsJson )).thenReturn (jobAsJson );
550576
551577 final Job job = client .createJob (NAMESPACE_NAME , JOB_NAME , meta );
552- assertThat (job ).isEqualTo (JOB );
578+ assertThat (job ).isEqualTo (JOB_WITH_LATEST_RUN );
553579
554580 verify (http , times (1 )).put (url , metaAsJson );
555581 }
You can’t perform that action at this time.
0 commit comments