Skip to content

Commit

Permalink
test(integration): added sleep time to the test avoiding eventual inc…
Browse files Browse the repository at this point in the history
…onsistency issue

Signed-off-by: Maximillian Arruda <dearrudam@gmail.com>
  • Loading branch information
dearrudam committed Mar 12, 2024
1 parent 0bffb58 commit cb481e7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,15 @@ void shouldUpdate() {
}

@Test
void shouldRemoveEntityByName() {
void shouldRemoveEntityByName() throws InterruptedException {
CommunicationEntity documentEntity = entityManager.insert(getEntity());

Thread.sleep(1_000L);
Element name = documentEntity.find("name").get();
SelectQuery query = select().from(COLLECTION_PERSON_NAME).where(name.name()).eq(name.get()).build();
DeleteQuery deleteQuery = delete().from(COLLECTION_PERSON_NAME)
.where(name.name()).eq(name.get()).build();
entityManager.delete(deleteQuery);
Thread.sleep(1_000L);
assertTrue(entityManager.select(query).collect(Collectors.toList()).isEmpty());
}

Expand Down

0 comments on commit cb481e7

Please sign in to comment.