Skip to content

Commit

Permalink
try thread sleep instead of test env, and run 100 times
Browse files Browse the repository at this point in the history
  • Loading branch information
lmossman committed Jun 29, 2022
1 parent 2904fde commit c94eaa2
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.jupiter.params.ParameterizedTest;
Expand Down Expand Up @@ -713,7 +714,7 @@ public void resetCancelRunningWorkflow() throws InterruptedException {

}

@Test
@RepeatedTest(100)
@Timeout(value = 60,
unit = TimeUnit.SECONDS)
@DisplayName("Test that cancelling a reset deletes streamsToReset from stream_resets table")
Expand All @@ -738,7 +739,7 @@ public void cancelResetRemovesStreamsToReset() throws InterruptedException {

testEnv.sleep(Duration.ofSeconds(30L));
workflow.cancelJob();
testEnv.sleep(Duration.ofMinutes(15L));
Thread.sleep(500);

Mockito.verify(mStreamResetActivity).deleteStreamResetRecordsForJob(new DeleteStreamResetRecordsForJobInput(connectionId, JOB_ID));
}
Expand Down

0 comments on commit c94eaa2

Please sign in to comment.