aplex commented on a change in pull request #3176:
URL: https://github.com/apache/incubator-gobblin/pull/3176#discussion_r551587799
##########
File path:
gobblin-modules/gobblin-azkaban/src/test/java/org/apache/gobblin/service/modules/orchestration/AzkabanClientTest.java
##########
@@ -65,55 +63,73 @@ public void setup() throws Exception {
.build();
}
+ @BeforeMethod
+ public void testSetup() {
+ projectName = "test-project-" + System.currentTimeMillis() + "-" +
UUID.randomUUID().toString().substring(0, 4);
+ description = "This is test project.";
+ }
+
+ @AfterMethod
+ public void testCleanup() throws AzkabanClientException {
+ this.client.deleteProject(projectName);
+ }
+
@AfterClass
public void cleanup() throws IOException {
this.client.close();
}
private void ensureProjectExist(String projectName, String description)
throws AzkabanClientException {
- // make sure it is in a clean state
- this.client.deleteProject(projectName);
-
- // make sure the project is created successfully
this.client.createProject(projectName, description);
}
- @Test(enabled = false)
- public void testFetchLog() throws AzkabanClientException {
- String execId = "11211956";
- String jobId = "tracking-hourly-bucket1";
-
- // fetch log
- this.client.fetchExecutionLog(execId, jobId, "0", "100000000", new
File("/tmp/sample.log"));
- }
+ public void testFetchLog() throws Exception {
+ String flowName = "test-exec-flow";
+ String jobId = "test-exec-flow";
+ ensureProjectExist(projectName, description);
+ File zipFile = createAzkabanZip(flowName);
+ this.client.uploadProjectZip(projectName, zipFile);
- @Test(enabled = false)
- public void testCreateProject() throws AzkabanClientException {
- String projectName = "project-create";
- String description = "This is a create project test.";
+ AzkabanExecuteFlowStatus execStatus = this.client.executeFlow(projectName,
flowName, Maps.newHashMap());
+ String execId = execStatus.getResponse().getExecId();
+
+ ByteArrayOutputStream logStream = null;
+ int maxTries = 10;
Review comment:
There is a comment explaining this later on, moved it higher for clarity.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]