11/*
2- * Copyright 2020 IEXEC BLOCKCHAIN TECH
2+ * Copyright 2020-2025 IEXEC BLOCKCHAIN TECH
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -57,9 +57,7 @@ void shouldSerializeAndDeserializeReplicate() throws JsonProcessingException {
5757 + "\" chainTaskId\" :\" chainTaskId\" ,"
5858 + "\" contributionHash\" :\" \" ,"
5959 + "\" workerWeight\" :0,"
60- + "\" appComputeLogsPresent\" :false,"
61- + "\" busyComputing\" :true,"
62- + "\" recoverable\" :true"
60+ + "\" appComputeLogsPresent\" :false"
6361 + "}" ;
6462 ObjectNode actualJsonNode = (ObjectNode ) mapper .readTree (jsonString );
6563 ObjectNode expectedJsonNode = (ObjectNode ) mapper .readTree (expectedString );
@@ -69,7 +67,7 @@ void shouldSerializeAndDeserializeReplicate() throws JsonProcessingException {
6967 }
7068
7169 @ Test
72- void shouldInitializeStatusProperly (){
70+ void shouldInitializeStatusProperly () {
7371 Replicate replicate = new Replicate (WALLET_WORKER , CHAIN_TASK_ID );
7472 assertThat (replicate .getStatusUpdateList ()).hasSize (1 );
7573
@@ -83,7 +81,7 @@ void shouldInitializeStatusProperly(){
8381 }
8482
8583 @ Test
86- void shouldUpdateReplicateStatus (){
84+ void shouldUpdateReplicateStatus () {
8785 Replicate replicate = new Replicate (WALLET_WORKER , CHAIN_TASK_ID );
8886 assertThat (replicate .getStatusUpdateList ()).hasSize (1 );
8987
@@ -104,7 +102,7 @@ void shouldUpdateReplicateStatus(){
104102 }
105103
106104 @ Test
107- void shouldGetProperLatestStatus (){
105+ void shouldGetProperLatestStatus () {
108106 Replicate replicate = new Replicate (WALLET_WORKER , CHAIN_TASK_ID );
109107 assertThat (replicate .getStatusUpdateList ()).hasSize (1 );
110108 assertThat (replicate .getCurrentStatus ()).isEqualTo (ReplicateStatus .CREATED );
@@ -116,7 +114,7 @@ void shouldGetProperLatestStatus(){
116114
117115
118116 @ Test
119- void shouldReturnTrueWhenContributed (){
117+ void shouldReturnTrueWhenContributed () {
120118 Replicate replicate = new Replicate ("0x1" , CHAIN_TASK_ID );
121119 replicate .updateStatus (STARTING , ReplicateStatusModifier .WORKER );
122120 replicate .updateStatus (ReplicateStatus .CONTRIBUTING , ReplicateStatusModifier .WORKER );
@@ -128,7 +126,7 @@ void shouldReturnTrueWhenContributed(){
128126 }
129127
130128 @ Test
131- void shouldReturnFalseWhenContributedMissing (){
129+ void shouldReturnFalseWhenContributedMissing () {
132130 Replicate replicate = new Replicate ("0x1" , CHAIN_TASK_ID );
133131 replicate .updateStatus (STARTING , ReplicateStatusModifier .WORKER );
134132 replicate .updateStatus (ReplicateStatus .CONTRIBUTING , ReplicateStatusModifier .WORKER );
@@ -139,7 +137,7 @@ void shouldReturnFalseWhenContributedMissing(){
139137 }
140138
141139 @ Test
142- void shouldBeCreatedLongAgo (){
140+ void shouldBeCreatedLongAgo () {
143141 final long maxExecutionTime = 60000 ;
144142 Date now = new Date ();
145143 Replicate replicate = new Replicate ("0x1" , CHAIN_TASK_ID );
@@ -151,7 +149,7 @@ void shouldBeCreatedLongAgo(){
151149 }
152150
153151 @ Test
154- void shouldNotBeCreatedLongAgo (){
152+ void shouldNotBeCreatedLongAgo () {
155153 final long maxExecutionTime = 60000 ;
156154 Date now = new Date ();
157155 Replicate replicate = new Replicate ("0x1" , CHAIN_TASK_ID );
@@ -162,33 +160,6 @@ void shouldNotBeCreatedLongAgo(){
162160 assertThat (replicate .isCreatedMoreThanNPeriodsAgo (2 , maxExecutionTime )).isFalse ();
163161 }
164162
165- @ Test
166- void shouldBeBusyComputing () {
167- Replicate replicate = new Replicate (WALLET_WORKER , CHAIN_TASK_ID );
168- assertThat (replicate .isBusyComputing ()).isTrue ();
169- replicate .updateStatus (STARTING , ReplicateStatusModifier .WORKER );
170- assertThat (replicate .isBusyComputing ()).isTrue ();
171- replicate .updateStatus (ReplicateStatus .APP_DOWNLOADING , ReplicateStatusModifier .WORKER );
172- assertThat (replicate .isBusyComputing ()).isTrue ();
173- replicate .updateStatus (ReplicateStatus .APP_DOWNLOADED , ReplicateStatusModifier .WORKER );
174- assertThat (replicate .isBusyComputing ()).isTrue ();
175- replicate .updateStatus (ReplicateStatus .COMPUTING , ReplicateStatusModifier .WORKER );
176- assertThat (replicate .isBusyComputing ()).isTrue ();
177-
178- replicate .updateStatus (ReplicateStatus .COMPUTED , ReplicateStatusModifier .WORKER );
179- assertThat (replicate .isBusyComputing ()).isFalse ();
180- replicate .updateStatus (ReplicateStatus .CONTRIBUTING , ReplicateStatusModifier .WORKER );
181- assertThat (replicate .isBusyComputing ()).isFalse ();
182- replicate .updateStatus (ReplicateStatus .CONTRIBUTED , ReplicateStatusModifier .WORKER );
183- assertThat (replicate .isBusyComputing ()).isFalse ();
184- replicate .updateStatus (ReplicateStatus .REVEALING , ReplicateStatusModifier .WORKER );
185- assertThat (replicate .isBusyComputing ()).isFalse ();
186- replicate .updateStatus (ReplicateStatus .REVEALED , ReplicateStatusModifier .WORKER );
187- assertThat (replicate .isBusyComputing ()).isFalse ();
188- replicate .updateStatus (ReplicateStatus .COMPLETED , ReplicateStatusModifier .WORKER );
189- assertThat (replicate .isBusyComputing ()).isFalse ();
190- }
191-
192163 // region getLastRelevantStatus
193164 @ Test
194165 void shouldGetLastRelevantStatusWhenOnlyRelevantStatus () {
0 commit comments