Gyeongtae Park created ZEPPELIN-6221:
----------------------------------------

             Summary: Improve test performance by reusing 
Neo4jCypherInterpreter instance in Neo4jCypherInterpreterTest
                 Key: ZEPPELIN-6221
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-6221
             Project: Zeppelin
          Issue Type: Improvement
            Reporter: Gyeongtae Park
             Fix For: 1.0.0, 0.12.1, 0.13.0


Currently, each test method in {{Neo4jCypherInterpreterTest}} creates and 
closes a new {{Neo4jCypherInterpreter}} instance using {{@BeforeEach}} and 
{{{}@AfterEach{}}}.
This leads to repeated interpreter initialization and shutdown, which is 
inefficient and introduces unnecessary overhead, especially when running 
against a live Neo4j Testcontainer.

To improve test performance and stability, we can:
 * Use {{@TestInstance(TestInstance.Lifecycle.PER_CLASS)}} to share a single 
interpreter instance across all test methods.

 * Move interpreter setup to {{@BeforeAll}} and cleanup to {{{}@AfterAll{}}}.

 * Open the interpreter once and reuse it for all tests, reducing overhead and 
avoiding resource leaks.

This change is purely internal and does not affect the behavior of the 
interpreter or its external API.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to