Skip to content

Commit

Permalink
[Test] Fix SharedBlobCacheServiceTests.testGetMultiThreaded (elastic#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ywangd authored Aug 30, 2024
1 parent 0489a37 commit 212fe03
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,6 @@ tests:
- class: org.elasticsearch.search.retriever.rankdoc.RankDocsSortBuilderTests
method: testEqualsAndHashcode
issue: https://github.com/elastic/elasticsearch/issues/112312
- class: org.elasticsearch.blobcache.shared.SharedBlobCacheServiceTests
method: testGetMultiThreaded
issue: https://github.com/elastic/elasticsearch/issues/112314
- class: org.elasticsearch.search.retriever.RankDocRetrieverBuilderIT
method: testRankDocsRetrieverWithCollapse
issue: https://github.com/elastic/elasticsearch/issues/112254
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,6 @@ public void testMassiveDecay() throws IOException {
* Exercise SharedBlobCacheService#get in multiple threads to trigger any assertion errors.
* @throws IOException
*/
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/112305")
public void testGetMultiThreaded() throws IOException {
final int threads = between(2, 10);
final int regionCount = between(1, 20);
Expand Down Expand Up @@ -494,11 +493,11 @@ public void testGetMultiThreaded() throws IOException {
assert allowAlreadyClosed || e.getMessage().equals("evicted during free region allocation") : e;
throw e;
}
assertTrue(cacheFileRegion.testOnlyNonVolatileIO() != null || cacheFileRegion.isEvicted());
if (incRef && cacheFileRegion.tryIncRef()) {
if (yield[i] == 0) {
Thread.yield();
}
assertNotNull(cacheFileRegion.testOnlyNonVolatileIO());
cacheFileRegion.decRef();
}
if (evict[i] == 0) {
Expand Down

0 comments on commit 212fe03

Please sign in to comment.