Skip to content

Conversation

@diegotorrespy
Copy link
Contributor

No description provided.

<version>${spring-boot.version}</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.testcontainers/elasticsearch -->
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- https://mvnrepository.com/artifact/org.testcontainers/elasticsearch -->

Comment on lines 63 to 68
// Wait for documents to be indexed
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't use Thread.sleep - there should be a better way to specifically wait until the documents are indexed - as written this will either be a flaky test or waste CI build time

String email = emailObj != null ? emailObj.toString()
.toLowerCase() : "";

assertTrue(name.contains("john") || email.contains("john"), "Expected 'john' in name or email");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed this one (not using AssertJ like the other refactors)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants