You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/05/04 09:58:04 UTC

[GitHub] [fineract] maektwain commented on pull request #817: Step 1 of improving SchedulerJobHelper to be more reliable and prevent flaky tests (FINERACT-922)

maektwain commented on pull request #817:
URL: https://github.com/apache/fineract/pull/817#issuecomment-623371051


   aha ! moving to functional style, strongly advise that we move other test cases also to await ability 
   though did you check this out [Await](https://github.com/awaitility/awaitility/wiki/Usage)  
   
   some question what about thread configuration ?
   
   Though I would like to see this happening, 
   
   ```java 
   await().atMost(5, SECONDS).until(scheduler());
   ```
   
   What I see from your example is that we can do this 
   
   ```java 
   @Test(timeout = 2000)
       public void awaitOperationSupportsSpecifyingZeroAsPollInterval() {
           new Asynch(fakeRepository).perform();
           with().pollDelay(TWO_HUNDRED_MILLISECONDS).pollInterval(Duration.ZERO).then().await().until(fakeRepositoryValueEqualsOne());
           assertEquals(1, fakeRepository.getValue());
       }
   ```
   
   Sources are awaitility package
   


----------------------------------------------------------------
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:
users@infra.apache.org