Code example for SimpleDateFormat

Methods: format, sleep

0
        log.info("Current Time " + getTime(Calendar.getInstance()));
        assertTrue(dssTaskClient.rescheduleTask(dsTaskInfo));
 
        log.info("Task rescheduled");
        try { 
            Thread.sleep(1000);
        } catch (InterruptedException ignore) {
 
        } 
    } 
 
    @Test(groups = "wso2.dss", dependsOnMethods = {"reScheduleTask"}, 
          description = "Check whether the task has been stopped properly") 
    public void stopScheduleTask() throws AxisFault, InterruptedException { 
        for (int i = 0; i < 5; i++) {
            double currentSalary = getEmployeeSalary(getEmployeeById(employeeId));
            log.info("current salary after rescheduling task #######" + currentSalary);
            log.info("Emp salary ########### " + empSalary);
            Assert.assertEquals(currentSalary, empSalary, "Task not properly Stopped after rescheduling task");
            Thread.sleep(5000);
        }