umustafi commented on code in PR #3864:
URL: https://github.com/apache/gobblin/pull/3864#discussion_r1468252492
##########
gobblin-service/src/test/java/org/apache/gobblin/service/GobblinServiceManagerTest.java:
##########
@@ -403,94 +429,145 @@ public void testCreateAgain() throws Exception {
Assert.assertEquals(exception.getStatus(), HttpStatus.CONFLICT_409);
}
+ /*
+ This test adds a new flowConfig to the client checks the config retrieved
using the getFlowConfig endpoint matches it
+ */
@Test (dependsOnMethods = "testCreateAgain")
public void testGet() throws Exception {
- FlowConfig flowConfig = this.flowConfigClient.getFlowConfig(TEST_FLOW_ID);
+ FlowId flowId = createFlowIdWithUniqueName(TEST_GROUP_NAME);
+ FlowConfig flowConfig = new FlowConfig().setId(flowId)
+ .setTemplateUris(TEST_TEMPLATE_URI).setSchedule(new
Schedule().setCronSchedule(TEST_SCHEDULE).setRunImmediately(true))
+ .setProperties(new StringMap(flowProperties));
+ this.flowConfigClient.createFlowConfig(flowConfig);
- Assert.assertEquals(flowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
- Assert.assertEquals(flowConfig.getId().getFlowName(), TEST_FLOW_NAME);
- Assert.assertEquals(flowConfig.getSchedule().getCronSchedule(),
TEST_SCHEDULE);
- Assert.assertEquals(flowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
- Assert.assertTrue(flowConfig.getSchedule().isRunImmediately());
+ FlowConfig getFlowConfig = this.flowConfigClient.getFlowConfig(flowId);
+ Assert.assertEquals(getFlowConfig.getId().getFlowGroup(), TEST_GROUP_NAME);
+ Assert.assertEquals(getFlowConfig.getId().getFlowName(),
flowId.getFlowName());
+ Assert.assertEquals(getFlowConfig.getSchedule().getCronSchedule(),
TEST_SCHEDULE);
+ Assert.assertEquals(getFlowConfig.getTemplateUris(), TEST_TEMPLATE_URI);
+ Assert.assertTrue(getFlowConfig.getSchedule().isRunImmediately());
// Add this assert back when getFlowSpec() is changed to return the raw
flow spec
- //Assert.assertEquals(flowConfig.getProperties().size(), 1);
- Assert.assertEquals(flowConfig.getProperties().get("param1"), "value1");
+ //Assert.assertEquals(getFlowConfig.getProperties().size(), 1);
Review Comment:
Yes this is up-to-date
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]