Skip to content

Segregate test methods in ThreadPoolMergeExecutorServiceDiskSpaceTests wrt to the mocked filesystems #130430

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

Conversation

albertzaharovits
Copy link
Contributor

Previously, out of zealousness for testing efficiency, the mocked filesystems were reused across the test suite class.
But this makes tests liable to interference wrt to filesystem stats calls. Moreover, if one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes #129296 #130205

@albertzaharovits albertzaharovits self-assigned this Jul 2, 2025
@albertzaharovits albertzaharovits added >test Issues or PRs that are addressing/adding tests :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. v9.0.4 v9.2.0 v9.1.1 v8.19.1 labels Jul 2, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-distributed-indexing (Team:Distributed Indexing)

@elasticsearchmachine elasticsearchmachine added the Team:Distributed Indexing Meta label for Distributed Indexing team label Jul 2, 2025
Comment on lines +102 to +107
if (setThreadPoolMergeSchedulerSetting) {
assertWarnings(
"[indices.merge.scheduler.use_thread_pool] setting was deprecated in Elasticsearch "
+ "and will be removed in a future release. See the breaking changes documentation for the next major version."
);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated change that consolidates warning headers assertions.

@@ -564,7 +556,7 @@ public void testAbortingOrRunningMergeTaskHoldsUpBudget() throws Exception {
testDoneLatch.await();
return null;
}).when(stallingMergeTask).abort();
threadPoolMergeExecutorService.submitMergeTask(stallingMergeTask);
assertTrue(threadPoolMergeExecutorService.submitMergeTask(stallingMergeTask));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unrelated change, just to make sure nothing unexpectedly fails when submitting a merge task.

Copy link
Contributor

@BrianRothermich BrianRothermich left a comment

Choose a reason for hiding this comment

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

LGTM

@albertzaharovits albertzaharovits added auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) auto-backport Automatically create backport pull requests when merged labels Jul 2, 2025
@elasticsearchmachine elasticsearchmachine merged commit 72b5c01 into elastic:main Jul 2, 2025
32 checks passed
@albertzaharovits albertzaharovits deleted the segrate_merge_executor_disk_space_tests branch July 2, 2025 16:17
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
9.0 Commit could not be cherrypicked due to conflicts
9.1 Commit could not be cherrypicked due to conflicts
8.19 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 130430

albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jul 3, 2025
Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes elastic#129296 elastic#130205
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jul 3, 2025
Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes elastic#129296 elastic#130205
albertzaharovits added a commit that referenced this pull request Jul 3, 2025
…iskSpaceTests wrt to the mocked filesystems (#130430) #130524

Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes #129296 #130205
elasticsearchmachine pushed a commit that referenced this pull request Jul 3, 2025
…iskSpaceTests wrt to the mocked filesystems (#130430) (#130522)

* assertTrue for submitMergeTask (#130430)

Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes #129296 #130205

* Ooops the warning response headers are different
elasticsearchmachine pushed a commit that referenced this pull request Jul 3, 2025
Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method.

Fixes #129296 #130205
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 3, 2025
Previously, out of zealousness for testing efficiency, the mocked
filesystems were reused across the test suite class. But this makes
tests liable to interference wrt to filesystem stats calls. Moreover, if
one test fails, it can trigger failures in other test methods.

This PR recreates the mocked filesystems for every test method. 

Fixes elastic#129296 elastic#130205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Automatically create backport pull requests when merged auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) :Distributed Indexing/Engine Anything around managing Lucene and the Translog in an open shard. Team:Distributed Indexing Meta label for Distributed Indexing team >test Issues or PRs that are addressing/adding tests v8.19.1 v9.0.4 v9.1.1 v9.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CI] ThreadPoolMergeExecutorServiceDiskSpaceTests testMergeTasksAreUnblockedWhenMoreDiskSpaceBecomesAvailable failing
3 participants