Skip to content

STDO-124: Fix NPE and test-isolation failures - #33

Draft
alextwigkit wants to merge 1 commit into
masterfrom
STDO-124-p4-fig-fixes
Draft

STDO-124: Fix NPE and test-isolation failures#33
alextwigkit wants to merge 1 commit into
masterfrom
STDO-124-p4-fig-fixes

Conversation

@alextwigkit

Copy link
Copy Markdown

Found while verifying a clean build from an empty local Maven repository as part of the STDO-124 Legacy App Studio source-handoff bet: fig is one of six sibling repos this bet is preparing versioned releases of.

What was fixed

  • PropertiesLoader.readFolder NPEd when File.listFiles() returned null (happens when the directory can't be listed, e.g. a permissions restriction). Hardened to treat a null result as no files rather than crashing.
  • Four MergedPropertiesLoaderTest failures, order-dependent: FigUtilsTest mutates the process-wide Fig.getInstance() singleton and never restores it, so a class running afterward in the same JVM inherits a polluted singleton. Added an @After teardown that resets it.

Both confirmed by isolating the failing tests before and after the fix, not by inference — running each test class alone reproduced/resolved the failure independently of run order.

Verified

mvn clean package from an empty local repository, twice after the fix: exit 0 both times, 54 tests run, 0 failures, 0 errors.

Part of the STDO-124 Legacy App Studio perpetual handoff bet; see PLAN.md in lucidworks/tbe-pitches (STDO-124-bet) for the full plan.

PropertiesLoader.readFolder NPEd on a null listFiles() result;
hardened to treat null as no files.

FigUtilsTest left the process-wide Fig singleton mutated with no
teardown, causing four unrelated MergedPropertiesLoaderTest failures
depending on run order. Added an @after reset.

Found while verifying a clean build from an empty local Maven repo
as part of the STDO-124 source-handoff bet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant