Skip to content

Conversation

@rogin
Copy link
Contributor

@rogin rogin commented Jul 4, 2025

Fixes bug where destinationSet.removeAllExcept(Object) fails to remove destinations when the given id/name is not found.

I verified the test method test_removeAllExceptObject_withSourceMap_removeAllForMetadataIdWhichDoesNotExist failed before the code fix then succeeded after the code fix.

Related
Original ticket with code change recommendation - nextgenhealthcare/connect#5875
Summary table in #121

@rogin rogin force-pushed the fix-destinationset branch 3 times, most recently from 7caadea to d484454 Compare July 4, 2025 03:32
@tonygermano
Copy link
Member

I was literally working on this one a couple nights ago 😄 I love the tests.

rogin and others added 2 commits July 4, 2025 15:47
This adds several tests for the DestinationSet.removeAllExcept(Object)
method, and confirms a bug exists.

Signed-off-by: Richard Ogin <rogin@users.noreply.github.com>
Issue: nextgenhealthcare/connect#5875
The DestinationSet.removeAllExcept(Object) method takes a destination
metadata id or destination name. If it's passed a reference to a
destination which does not exist, then it should remove all entries from
the set. This was working correctly if a number was passed to the method
which did not refer to a destination which remained in the set, but not
for a name. This change ensures that when a destination name does not
appear in the destination set, that all destinations are removed.

Additonal tests were also added to DestinationSetTest for greater
coverage.

Signed-off-by: Tony Germano <tony@germano.name>
Issue: nextgenhealthcare/connect#5875
Reported-by: Mike Hokanson <mhokanson@gmail.com>
@tonygermano tonygermano force-pushed the fix-destinationset branch from e640b02 to e686d61 Compare July 4, 2025 19:51
Copy link
Member

@tonygermano tonygermano left a comment

Choose a reason for hiding this comment

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

I made this two commits. The first adds your test class. The second has the fix and adds additional tests. It looks good to me at this point.

Copy link
Contributor

@jonbartels jonbartels left a comment

Choose a reason for hiding this comment

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

LGTM

@rogin rogin marked this pull request as ready for review July 5, 2025 03:12
@tonygermano tonygermano merged commit e686d61 into OpenIntegrationEngine:main Jul 5, 2025
2 checks passed
@tonygermano tonygermano added this to the 4.5.2 milestone Jul 5, 2025
@tonygermano tonygermano added the bug Something isn't working label Jul 5, 2025
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.

4 participants