comment out flaky SchedulerJobsTest (FINERACT-852) (#764)

Also adds a new assertion for a clearer failure message than the
confusing low-level technical ArrayIndexOutOfBoundsException for
whenever this test will be re-activated later.
This commit is contained in:
Michael Vorburger ⛑️
2020-04-15 10:36:46 +01:00
committed by GitHub
parent fd7fa63002
commit 9517051340
@@ -29,6 +29,7 @@ import org.apache.fineract.integrationtests.common.SchedulerJobHelper;
import org.apache.fineract.integrationtests.common.Utils; import org.apache.fineract.integrationtests.common.Utils;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
@SuppressWarnings({ "rawtypes", "unchecked", "static-access" }) @SuppressWarnings({ "rawtypes", "unchecked", "static-access" })
@@ -50,6 +51,7 @@ public class SchedulerJobsTest {
} }
@Test @Test
@Ignore // TODO FINERACT-852
public void testSchedulerJobs() throws InterruptedException { public void testSchedulerJobs() throws InterruptedException {
this.schedulerJobHelper = new SchedulerJobHelper(this.requestSpec, this.responseSpec); this.schedulerJobHelper = new SchedulerJobHelper(this.requestSpec, this.responseSpec);
@@ -91,8 +93,8 @@ public class SchedulerJobsTest {
// Updating Scheduler Job // Updating Scheduler Job
HashMap changes = this.schedulerJobHelper.updateSchedulerJob(this.requestSpec, this.responseSpec, jobId.toString(), HashMap changes = this.schedulerJobHelper.updateSchedulerJob(this.requestSpec, this.responseSpec, jobId.toString(),
active.toString()); active.toString());
// Verifying Scheduler Job updation // Verifying Scheduler Job updates
Assert.assertEquals("Verifying Scheduler Job Updation", active, changes.get("active")); Assert.assertEquals("Verifying Scheduler Job Updates", active, changes.get("active"));
// Executing Scheduler Job // Executing Scheduler Job
this.schedulerJobHelper.runSchedulerJob(this.requestSpec, jobId.toString()); this.schedulerJobHelper.runSchedulerJob(this.requestSpec, jobId.toString());
@@ -112,10 +114,9 @@ public class SchedulerJobsTest {
jobId.toString()); jobId.toString());
// Verifying the Status of the Recently executed Scheduler Job // Verifying the Status of the Recently executed Scheduler Job
Assert.assertFalse("Job History is empty :( Was it too slow? Failures in background job?", jobHistoryData.isEmpty());
Assert.assertEquals("Verifying Last Scheduler Job Status", "success", Assert.assertEquals("Verifying Last Scheduler Job Status", "success",
jobHistoryData.get(jobHistoryData.size() - 1).get("status")); jobHistoryData.get(jobHistoryData.size() - 1).get("status"));
} }
} }
} }