mosermw commented on PR #9894: URL: https://github.com/apache/nifi/pull/9894#issuecomment-2836170010
> Is this something that should be considered for a unit or system test? It seems like somewhat of an edge case, and as a removal of behavior, it may not make sense to have a test, but worth considering. I struggled with this @exceptionfactory. I could make a test of StandardVersionedComponentSynchronizer to verify that after synchronization, a VersionedProcessGroup's flowSnapshot is null, but that seemed a bit contrived since it wouldn't explain "why" that's desired. In the end, it is desired because the StandardNiFiServiceFacade getLocalModifications() method will only update a VersionedProcessGroup's flowSnapshot if it doesn't already have a copy. I could make a unit test to verify that happens, but that code logic is straightforward (only 1 if statement) and it's not really related to the changes I made. I could write an integration test that exercises all of this, starting with a call to StandardNiFiServiceFacade pasteComponents() and continuing with a call to StandardNiFiServiceFacade getLocalModifications() to exercise the scenario I described in the ticket ... copy/paste of a version controlled ProcessGroup that already has local modifications. But that seems like an insanely specific scenario to support in tests, so what are your thoughts on that? -- 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]
