Skip to content

Commit

Permalink
Fix random behaviour in JobCoreServiceTest
Browse files Browse the repository at this point in the history
  • Loading branch information
MarinHadzhiev committed Apr 7, 2022
1 parent 5f8c9c4 commit 0dfdd00
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,14 @@ public void setUp() throws Exception {
*/
@Test
public void createJob() throws SchedulerException {
jobCoreService.removeJob("test_job1");
jobCoreService.createJob("test_job1", "test_group", "org....", "handler.js", "engine type", "Test", "expr...", false);
List<JobDefinition> list = jobCoreService.getJobs();
assertEquals(1, list.size());
JobDefinition jobDefinition = list.get(0);
System.out.println(jobDefinition.toString());
assertEquals("test_job1", jobDefinition.getName());
String jobName = "test_job1";
jobCoreService.removeJob(jobName);
jobCoreService.createJob(jobName, "test_group", "org....", "handler.js", "engine type", "Test", "expr...", false);
JobDefinition jobDefinition = jobCoreService.getJob(jobName);

assertEquals(jobName, jobDefinition.getName());
assertEquals("Test", jobDefinition.getDescription());
jobCoreService.removeJob("test_job1");
jobCoreService.removeJob(jobName);
}

/**
Expand Down

0 comments on commit 0dfdd00

Please sign in to comment.