Uwe Schindler created LUCENE-9110:
-------------------------------------

             Summary: Use StackWalker in tests instead of iterating through 
StackTraceElement arrays
                 Key: LUCENE-9110
                 URL: https://issues.apache.org/jira/browse/LUCENE-9110
             Project: Lucene - Core
          Issue Type: Improvement
          Components: general/test
            Reporter: Uwe Schindler
            Assignee: Uwe Schindler
             Fix For: master (9.0), 8.5


Followup of LUCENE-9109:
There are a lot of tests (especially around IndexWriter) that look into stack 
traces to inject failures or check that some methods were called in ther call 
stack.

This issue will refactor all those tests by adding a few methods to 
LuceneTestCase that make it easy to verify if some method call/class is in 
stack trace. On master (Java 11) we can use StackWalker to do this checks, 
which has a speedup of >2 times (depending on how you test it).

For branch 8.x i will apply the same patch, just the LuceneTestCase methods use 
the old "Java 8" way to inspect stack trace using the thread's stack trace 
(which is very expensive).

So this issue is mainly about refactoring the tests to use a common method 
pattern to check the existence of stack frames.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to