lxb007981 opened a new pull request, #1220: URL: https://github.com/apache/jackrabbit-oak/pull/1220
fix two order-dependent tests by resetting hit count. Related test: [org.apache.jackrabbit.oak.plugins.index.property.OrderedPropertyIndexProviderTest.singleQueryRun](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexProviderTest.java#L58) [org.apache.jackrabbit.oak.plugins.index.property.OrderedPropertyIndexProviderTest.multipleQueryRuns](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexProviderTest.java#L68) These two tests modify the [hit count](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexProvider.java#L37) of `OrderedPropertyIndexProvider` without resetting it after the test, but the assertion in the test [multipleQueryRuns](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexProviderTest.java#L68) relies on this hit count. The test [multipleQueryRuns](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/property/OrderedPropertyIndexProviderTest.java#L68) implicitly assumes [singleQueryRun](https://github.com/lxb007981/jackrabbit-oak/blob/0440e096dc7a460d206c77a5f178796db31a0ef4/oak-core/src/test/java/org/apache/jackrabbi t/oak/plugins/index/property/OrderedPropertyIndexProviderTest.java#L58) has already run before, which makes the test order-dependent. ### Describe how you did it The fix introduces a method `resetHits()` to reset the hit count before each test starts. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
