@@ -54,7 +54,7 @@ class IntegrationTests {
5454 public static final int BLOCK_TIME_MS = 5000 ;
5555 public static final int MAX_BLOCK_TO_WAIT = 3 ;
5656 public static final int POLLING_PER_BLOCK = 2 ;
57- public static final int POLLING_TIME_MS = BLOCK_TIME_MS / POLLING_PER_BLOCK ;
57+ public static final int POLLING_INTERVAL_MS = BLOCK_TIME_MS / POLLING_PER_BLOCK ;
5858 public static final int MAX_POLLING_ATTEMPTS = MAX_BLOCK_TO_WAIT
5959 * POLLING_PER_BLOCK ;
6060
@@ -88,7 +88,7 @@ public void shouldBeFinalized() throws Exception {
8888 Assertions .assertTrue (StringUtils .isNotEmpty (chainTaskId ));
8989 log .info ("Requested task initialize: {}" , chainTaskId );
9090 //should wait since returned taskID is computed, initialize is not mined yet
91- waitStatus (chainTaskId , ACTIVE , POLLING_TIME_MS , MAX_POLLING_ATTEMPTS );
91+ waitStatus (chainTaskId , ACTIVE , POLLING_INTERVAL_MS , MAX_POLLING_ATTEMPTS );
9292
9393 String someBytes32Payload = TeeUtils .TEE_SCONE_ONLY_TAG ; //any would be fine
9494 String enclaveChallenge = BytesUtils .EMPTY_ADDRESS ;
@@ -103,7 +103,7 @@ public void shouldBeFinalized() throws Exception {
103103 String contributeResponseBody = appClient .requestContributeTask (chainTaskId , contributeArgs );
104104 Assertions .assertTrue (StringUtils .isNotEmpty (contributeResponseBody ));
105105 log .info ("Requested task contribute: {}" , contributeResponseBody );
106- waitStatus (chainTaskId , ChainTaskStatus .REVEALING , POLLING_TIME_MS ,
106+ waitStatus (chainTaskId , ChainTaskStatus .REVEALING , POLLING_INTERVAL_MS ,
107107 MAX_POLLING_ATTEMPTS );
108108
109109 TaskRevealArgs taskRevealArgs = new TaskRevealArgs (someBytes32Payload );
@@ -116,7 +116,7 @@ public void shouldBeFinalized() throws Exception {
116116 String finalizeResponseBody = appClient .requestFinalizeTask (chainTaskId , taskFinalizeArgs );
117117 Assertions .assertTrue (StringUtils .isNotEmpty (finalizeResponseBody ));
118118 log .info ("Requested task finalize: {}" , finalizeResponseBody );
119- waitStatus (chainTaskId , ChainTaskStatus .COMPLETED , POLLING_TIME_MS ,
119+ waitStatus (chainTaskId , ChainTaskStatus .COMPLETED , POLLING_INTERVAL_MS ,
120120 MAX_POLLING_ATTEMPTS );
121121 }
122122
@@ -138,7 +138,7 @@ public void shouldBurstTransactionsWithAverageOfOneTxPerBlock(){
138138 try {
139139 //maximum waiting time equals nb of submitted txs
140140 //1 tx/block means N txs / N blocks
141- waitStatus (chainTaskId , ACTIVE , POLLING_TIME_MS ,
141+ waitStatus (chainTaskId , ACTIVE , POLLING_INTERVAL_MS ,
142142 (taskVolume + 2 ) * MAX_POLLING_ATTEMPTS );
143143 //no need to wait for propagation update in db
144144 Assertions .assertTrue (true );
@@ -152,7 +152,7 @@ public void shouldBurstTransactionsWithAverageOfOneTxPerBlock(){
152152 }
153153
154154 private String triggerDeal (int taskVolume ) {
155- int secondsPollingInterval = POLLING_TIME_MS / 1000 ;
155+ int secondsPollingInterval = POLLING_INTERVAL_MS / 1000 ;
156156 int secondsTimeout = secondsPollingInterval * MAX_POLLING_ATTEMPTS ;
157157 String appAddress = iexecHubService .createApp (buildRandomName ("app" ),
158158 "docker.io/repo/name:1.0.0" ,
@@ -313,7 +313,7 @@ private void waitBeforeFinalizing(String chainTaskId) throws Exception {
313313 int attempts = 0 ;
314314 while (revealCounter != winnerCounter ) {
315315 log .info ("Waiting for reveals ({}/{})" , revealCounter , winnerCounter );
316- Thread .sleep (POLLING_TIME_MS );
316+ Thread .sleep (POLLING_INTERVAL_MS );
317317 revealCounter = iexecHubService .getChainTask (chainTaskId )
318318 .map (ChainTask ::getRevealCounter )
319319 .orElse (0 );
0 commit comments