apache / apache/lucene

TestLRUQueryCache.testDetectMutatedQueries does not work on Java 9 b150 [LUCENE-7604]

Open
#8,655 2 comments 0 reactions 0 assignees View on GitHub
affects-version:7.0 legacy-jira-label:Java9 legacy-jira-priority:Major module:core/search type:bug
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

For some strange reason, the test testDetectMutatedQueries of TestLRUQueryCache suite does not trigger the ConcurrentModificationException on changing the hashCode (see BadQuery class).

I have no idea why this happens, so I will disable this test on Java 9 for now.

The other test also fails with Java 9 because of RamUsageTester (#8646), but this is unrelated, so I opened a separate issue.

---
Migrated from [LUCENE-7604](https://issues.apache.org/jira/browse/LUCENE-7604) by Uwe Schindler (@uschindler), updated Mar 07 2018
Linked issues:
- #8646

Contributor guide

Open the contributing guide

Research direction

Start with TestLRUQueryCache.testDetectMutatedQueries and its BadQuery class, then reproduce the behavior on Java 9 b150 and compare it with other Java versions. Done means explaining why the ConcurrentModificationException is not triggered and applying or verifying Java 9-specific test handling; the separate RamUsageTester failure is out of scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.