@@ -71,9 +71,9 @@ public void canRevealAllValid() {
7171 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
7272 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
7373 when (credentialsService .getCredentials ()).thenReturn (credentials );
74- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
74+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
7575
76- assertThat (revealService .canReveal (chainTaskId )).isTrue ();
76+ assertThat (revealService .canReveal (chainTaskId , 1 )).isTrue ();
7777 }
7878
7979 @ Test
@@ -102,9 +102,9 @@ public void cannotRevealSinceChainTaskStatusWrong() {
102102 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
103103 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
104104 when (credentialsService .getCredentials ()).thenReturn (credentials );
105- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (false );
105+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (false );
106106
107- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
107+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
108108 }
109109
110110 @ Test
@@ -133,9 +133,9 @@ public void cannotRevealSinceRevealDeadlineReached() {
133133 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
134134 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
135135 when (credentialsService .getCredentials ()).thenReturn (credentials );
136- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
136+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
137137
138- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
138+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
139139 }
140140
141141 @ Test
@@ -164,9 +164,9 @@ public void cannotRevealSinceChainContributionStatusWrong() {
164164 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
165165 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
166166 when (credentialsService .getCredentials ()).thenReturn (credentials );
167- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
167+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
168168
169- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
169+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
170170 }
171171
172172 @ Test
@@ -195,9 +195,9 @@ public void cannotRevealSinceHashDoesntMatchConsensus() {
195195 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
196196 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
197197 when (credentialsService .getCredentials ()).thenReturn (credentials );
198- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
198+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
199199
200- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
200+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
201201 }
202202
203203 @ Test
@@ -226,9 +226,9 @@ public void cannotRevealSinceContributionResultHashWrong() {
226226 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
227227 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
228228 when (credentialsService .getCredentials ()).thenReturn (credentials );
229- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
229+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
230230
231- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
231+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
232232 }
233233
234234 @ Test
@@ -255,17 +255,17 @@ public void cannotRevealSinceContributionResultSealWrong() {
255255 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
256256 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn (deterministHash );
257257 when (credentialsService .getCredentials ()).thenReturn (credentials );
258- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
258+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
259259
260- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
260+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
261261 }
262262
263263 @ Test
264264 public void cannotRevealSinceCannotFindChainTask () {
265265 String chainTaskId = "0xd94b63fc2d3ec4b96daf84b403bbafdc8c8517e8e2addd51fec0fa4e67801be8" ;
266266 when (iexecHubService .getChainTask (chainTaskId )).thenReturn (Optional .empty ());
267267
268- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
268+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
269269 }
270270
271271 @ Test
@@ -281,10 +281,10 @@ public void cannotRevealSinceCannotFindChainContribution() {
281281 .build ());
282282 when (iexecHubService .getChainTask (chainTaskId )).thenReturn (optionalChainTask );
283283 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (Optional .empty ());
284- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
284+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
285285
286286
287- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
287+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
288288 }
289289
290290 @ Test
@@ -313,9 +313,9 @@ public void cannotRevealSinceDeterministHashIsEmpty() {
313313 when (iexecHubService .getChainContribution (chainTaskId )).thenReturn (optionalChainContribution );
314314 when (resultService .getDeterministHashForTask (chainTaskId )).thenReturn ("" );
315315 when (credentialsService .getCredentials ()).thenReturn (credentials );
316- when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId )).thenReturn (true );
316+ when (iexecHubService .isChainTaskRevealingWhenNodeNotSync (chainTaskId , 1 )).thenReturn (true );
317317
318- assertThat (revealService .canReveal (chainTaskId )).isFalse ();
318+ assertThat (revealService .canReveal (chainTaskId , 1 )).isFalse ();
319319 }
320320
321321 @ Test
0 commit comments