Skip to content

Commit

Permalink
Use XOR instead of OR in test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornaton committed Feb 13, 2023
1 parent 77f7152 commit 467da7d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ void shouldAddTaskASingleTime() {
// while the other one has failed.
final Optional<Task> task1 = results.get(0);
final Optional<Task> 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();
Expand Down

0 comments on commit 467da7d

Please sign in to comment.