Skip to content

Fix/v9 test issues - #2562

Merged
JanKallman merged 2 commits into
develop9from
fix/v9-test-issues
Oct 7, 2026
Merged

JanKallman merged 2 commits into
develop9from
fix/v9-test-issues

Conversation

@swmal

@swmal swmal commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Make the test suite safe for parallel execution

EPPlusTest runs with MSTest parallelization at method level. This PR fixes the intermittent failures this caused.

Library fix

  • StructureKeys: a static lookup dictionary was filled lazily without locking. Concurrent first use from separate packages could corrupt it, or silently return null data types for cell picture keys. The table is now built once in the type initializer and only read afterwards.

Tests

  • Added [DoNotParallelize] to classes that share a static workbook or change process-wide state (license, global configuration).
  • Made output file names unique where tests wrote to the same file.
  • Removed a test that set a commercial license key globally.
  • SaveAndCleanup now includes the inner exception in the message (MSTest hides it for ClassCleanup failures) and disposes the package when saving fails.
  • Added StructureKeysTests: table content, a guard against mutable static fields, and a parallel cell picture smoke test.

Verification

Full suite (~6,700 tests) green twice per target framework (net8.0, net481).

@swmal swmal added this to the EPPlus 9.0 or later milestone Oct 6, 2026
@swmal swmal self-assigned this Oct 6, 2026
@swmal swmal added the bug Something isn't working label Oct 6, 2026
@JanKallman
JanKallman merged commit 7d13fa5 into develop9 Oct 7, 2026
3 checks passed
@JanKallman
JanKallman deleted the fix/v9-test-issues branch October 7, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants