From 467da7da0063895bd69eee35067341714b21d409 Mon Sep 17 00:00:00 2001 From: Maxence Cornaton Date: Mon, 13 Feb 2023 15:02:43 +0100 Subject: [PATCH] Use XOR instead of OR in test --- .../com/iexec/core/task/TaskServiceRealRepositoryTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/iexec/core/task/TaskServiceRealRepositoryTest.java b/src/test/java/com/iexec/core/task/TaskServiceRealRepositoryTest.java index feca641e..7701d729 100644 --- a/src/test/java/com/iexec/core/task/TaskServiceRealRepositoryTest.java +++ b/src/test/java/com/iexec/core/task/TaskServiceRealRepositoryTest.java @@ -102,8 +102,8 @@ void shouldAddTaskASingleTime() { // while the other one has failed. final Optional task1 = results.get(0); final Optional task2 = results.get(1); - assertThat(task1.isEmpty() || task2.isEmpty()).isTrue(); - assertThat(isExpectedTask(task, task1) || isExpectedTask(task, task2)).isTrue(); + assertThat(task1.isEmpty() ^ task2.isEmpty()).isTrue(); + assertThat(isExpectedTask(task, task1) ^ isExpectedTask(task, task2)).isTrue(); // Finally, let's simply check the task has effectively been added. assertThat(taskRepository.findByChainTaskId(CHAIN_TASK_ID)).isPresent();