Removing invalid assertion from SnapshotLifecycleServiceTests #107736
+0
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SnapshotLifecycleServiceTests.testPolicyCRUD() gets the number of snapshot tasks that have executed, updates the cluster state to cancel any pending snapshot tasks, and then asserts that the number of tasks that has executed is still the same. The problem is that since the scheduler is running in another thread, in between the time that the number of tasks is grabbed and the time that the cluster state update is complete, another task could have begun executing. So it is possible that when we check the number of tasks again after that, it is higher than it was before. This happens rarely from the command line, but I can reproduce it 100% of the time in the debugger by just putting a breakpoint on the line that captures the number of tasks in the
currentCount2
variable. I think it is the assertion that is broken rather than the behavior. This PR removes the bad assertion.Closes #107506