Skip to content

Commit

Permalink
Merge pull request #37 from sashirestela/36-failing-unit-test-perhaps…
Browse files Browse the repository at this point in the history
…-a-race-condition-issue

Fixing race condition in unit test
  • Loading branch information
sashirestela authored Jan 29, 2024
2 parents 9769d81 + 58b34ef commit 65c2c8d
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 65c2c8d

Please sign in to comment.