Skip to content

Commit

Permalink
Fixing race condition in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sashir Estela committed Jan 29, 2024
1 parent 9769d81 commit 58b34ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ interface SyncService {
Stream<Demo> getDemoStream(@Body RequestDemo request);
}

interface NotSavedService {

@GET("/demos")
CompletableFuture<List<Demo>> goodMethod();

}

@NoArgsConstructor
@AllArgsConstructor
@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ void shouldSaveInterfaceMetadataWhenAccomplishValidtion() {
@Test
void shouldThrownExceptionWhenTryingToGetNotPreviouslySavedInterface() {
Exception exception = assertThrows(CleverClientException.class,
() -> store.get(ITest.SyncService.class));
() -> store.get(ITest.NotSavedService.class));
assertTrue(exception.getMessage().equals(
"The interaface SyncService has not been saved yet."));
"The interaface NotSavedService has not been saved yet."));
}

@Test
Expand Down

0 comments on commit 58b34ef

Please sign in to comment.