Skip to content

Varioius IsolatedNetworkTablesExtension fixes - #126

Merged
kcooney merged 3 commits into
mainfrom
kcooney/isolated-nt-ex-fixes
Feb 1, 2026
Merged

Varioius IsolatedNetworkTablesExtension fixes#126
kcooney merged 3 commits into
mainfrom
kcooney/isolated-nt-ex-fixes

Conversation

@kcooney

@kcooney kcooney commented Feb 1, 2026

Copy link
Copy Markdown
Contributor
  • Restore Preferences instance before calling waitForListenerQueue()
    • This removes the listener added by Preferences before draining the
      listener queue
  • Install test NetworkTableInstance in beforeEach()
    • This ensures that tests that modify Preferences use a test instance
      event ifthey do not inject a NetworkTableInstance into the test method
  • Simplify creation of Namespace
    • Create Namespace only from the extension class name (the method name
      is part of the ExtensionContext when resolveParameter() is called for
      test method parameter injection)

@kcooney kcooney added this to the Version 2.0.0 Release milestone Feb 1, 2026
@kcooney
kcooney force-pushed the kcooney/isolated-nt-ex-fixes branch from 104f792 to 0f1dbd4 Compare February 1, 2026 18:01
@kcooney kcooney changed the title IsolatedNetworkTablesExtension support for constructor injection IsolatedNetworkTablesExtension replaces the instance in beforeEach() Feb 1, 2026
@kcooney
kcooney force-pushed the kcooney/isolated-nt-ex-fixes branch 3 times, most recently from 0eb6ee7 to c7fe89e Compare February 1, 2026 19:34
@kcooney kcooney changed the title IsolatedNetworkTablesExtension replaces the instance in beforeEach() Varioius IsolatedNetworkTablesExtension fixes Feb 1, 2026
@kcooney
kcooney force-pushed the kcooney/isolated-nt-ex-fixes branch from c7fe89e to 7f317e2 Compare February 1, 2026 19:39
Create `Namespace1 only from the extension class name (the method name is part
of the `ExtensionContext` when `resolveParameter()` is called for test
method parameter injection)
@kcooney
kcooney force-pushed the kcooney/isolated-nt-ex-fixes branch 2 times, most recently from a39e0bd to 5ab7d71 Compare February 1, 2026 19:50
This ensures that tests that modify Preferences use a test instance even if
they do not inject a NetworkTableInstance into the test method.

@cuttestkittensrule cuttestkittensrule left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@kcooney
kcooney force-pushed the kcooney/isolated-nt-ex-fixes branch from 5ab7d71 to b2aeeff Compare February 1, 2026 21:00
@kcooney
kcooney merged commit cb923f0 into main Feb 1, 2026
1 check passed
@kcooney
kcooney deleted the kcooney/isolated-nt-ex-fixes branch February 1, 2026 21:14
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.

2 participants