Skip to content

Commit 0fd5f62

Browse files
committed
Fix test
1 parent ecee2a3 commit 0fd5f62

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/test/java/com/iexec/worker/docker/ComputationServiceTests.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ public void shouldComputeTeeTask() {
146146
TaskDescription task = getStubTaskDescription(false);
147147
ContributionAuthorization contributionAuth = getStubAuth(TEE_ENCLAVE_CHALLENGE);
148148
ContainerConfig containerConfig = mock(ContainerConfig.class);
149-
String expectedStdout = "Computed successfully 1 !";
149+
String expectedStdout1 = "Computed successfully 1 !";
150+
String expectedStdout2 = "Computed successfully 1 !";
150151
String awesomeSessionId = "awesomeSessionId";
151152
ArrayList<String> stubSconeEnv = new ArrayList<>();
152153
stubSconeEnv.add("fooBar");
@@ -157,12 +158,13 @@ public void shouldComputeTeeTask() {
157158
when(customDockerClient.buildSconeContainerConfig(any(), any(), any(), any()))
158159
.thenReturn(containerConfig);
159160
when(customDockerClient.dockerRun(CHAIN_TASK_ID, containerConfig, task.getMaxExecutionTime()))
160-
.thenReturn(expectedStdout);
161+
.thenReturn(expectedStdout1)
162+
.thenReturn(expectedStdout2);
161163

162164
Pair<ReplicateStatus, String> result = computationService.runTeeComputation(task, contributionAuth);
163165

164166
assertThat(result.getLeft()).isEqualTo(COMPUTED);
165-
assertThat(result.getRight()).isEqualTo(expectedStdout);
167+
assertThat(result.getRight()).isEqualTo(expectedStdout1 + expectedStdout2);
166168
}
167169

168170
@Test

0 commit comments

Comments
 (0)