ShreyeshArangath opened a new issue, #1729:
URL: https://github.com/apache/auron/issues/1729

   **Describe the bug**
   The configuration component is:
   - Backed by a global singleton and process-wide mutable state.
   - Read indirectly through static helpers instead of via injected or scoped 
configuration.
   - Not aligned with the usual test utilities (e.g., per-test overrides / 
context-local configs).
   - This makes it difficult for unit tests to toggle config in a safe, local 
way.
   
   Ideally, it should look like the utility provided by AuronConverters. 
   
   ```scala
     private lazy val foo: Boolean =
       AuronConverters.getBooleanConf(
         "spark.auron.foo",
         defaultValue = false)
   ```
   
   **To Reproduce**
   1. Write code that reads a configuration flag via the global config helper.
   2. In a unit test, try to change behavior by setting that config just for 
the test (e.g., via a per-test helper or context API).
   3. The code still reads from the global state.
   
   **Expected behavior**
   Configuration should be:
   - Scoped (per test, per request, or per session), not global.
   - Injectable or overridable at the boundary of the component under test.
   - Compatible with normal testing patterns (e.g., fixtures, context managers, 
withConfig { ... }-style APIs).
   
   **Screenshots**
   <!--
   If applicable, add screenshots to help explain your problem.
   -->
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->
   A more test-friendly design would centralize config in a small object passed 
into components (or read from a clearly scoped context), so each test can 
construct the configuration it needs without mutating global state.
   


-- 
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]

Reply via email to