-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FMWK-69 Fix condition timeout and improve tests #442
Conversation
roimenashe
commented
Oct 18, 2022
•
edited
Loading
edited
- Use count() that are not as-info based in tests (which doesn't exclude deleted record that wasn't removed yet).
- Reduce redundant code executions - use BeforeAll() instead of BeforeEach() when possible.
- Remove blockhound for inactivity (latest version release was on April 2021) - it is also complicates our build and tests.
- Refactor test operations (reactive and non-reactive).
…set (using count() and as-info command behind the scenes). 2. Refactor test operations (reactive and non-reactive).
protected boolean isEntityClassSetEmpty(Class<?> clazz) { | ||
Long count = template.count(clazz).block(); | ||
if (count != null) { | ||
return count == 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 is int
return count == 0; | |
return count == 0L; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add test for it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's completely internal infrastructure for our test flow, just replaced it with different logic (basically a scan and count) because template.count
takes too much time due to Aerospike internal delete mechanism which doesn't actually removes the records - only removes the entry from the PK.
Check latest commit.
Do not merge yet - working on improving the test flow (currently takes 15min to complete). |
…ead of excluding the objects that was marked for deletion. It takes time for template.count(clazz) to reach 0 after truncate. Revert duration limit back to 10 sec.
…de records for deletion).
… 2021) and it complicates our build and tests. 2. Refactor tests - use BeforeAll over BeforeEach when possible (logically) to reduce tests total execution time.
…-timeouts-in-tests # Conflicts: # src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateCountTests.java # src/test/java/org/springframework/data/aerospike/core/AerospikeTemplateFindByQueryTests.java # src/test/java/org/springframework/data/aerospike/core/reactive/ReactiveAerospikeTemplateCountRelatedTests.java # src/test/java/org/springframework/data/aerospike/core/reactive/ReactiveAerospikeTemplateFindByQueryTests.java # src/test/java/org/springframework/data/aerospike/query/QualifierTests.java # src/test/java/org/springframework/data/aerospike/query/reactive/ReactiveQualifierTests.java # src/test/java/org/springframework/data/aerospike/repository/PersonRepositoryQueryTests.java