eye-gu opened a new issue, #7393: URL: https://github.com/apache/shenyu/issues/7393
### Description Since PR #7342 was merged (commit e27fb02f6, 2026-10-01), the `ci` workflow fails on master with 3 test failures in `org.apache.shenyu.admin.listener.DataChangedEventDispatcherTest`: - `onApplicationEventNotMasterForwardsEventAndKeepsAbstractListenersTest:343` - `onApplicationEventNotMasterForwardFailedStillUpdatesLocalCachesTest:359` - `onApplicationEventStandaloneNeverForwardsTest:372` Latest master CI run on `a12aa3e5` fails with `Tests run: 1721, Failures: 3`: https://github.com/apache/shenyu/actions/runs/36828192900 ### Root cause `DataChangedEventDispatcher.dispatch()` invokes the 3-arg overload (`DataChangedEventDispatcher.java:115`): listener.onPluginChanged((List<PluginData>) event.getSource(), event.getEventType(), event.getNamespaceId()); but the new tests verify the 2-arg overload: verify(httpLongPollingDataChangedListener, times(1)).onPluginChanged(anyList(), any()); In `DataChangedListener` the 3-arg method is a default method delegating to the 2-arg one (`DataChangedListener.java:74-75`). Since the tests use plain `@Mock` listeners, Mockito does not execute default-method bodies, so the 2-arg method is never invoked: Argument(s) are different! Wanted: httpLongPollingDataChangedListener.onPluginChanged(<any List>, <any>); Actual invocations have different arguments: httpLongPollingDataChangedListener.onPluginChanged([], null, null); -> at DataChangedEventDispatcher.dispatch(DataChangedEventDispatcher.java:115) ### Suggested fix Align the verifications in these 3 tests with the 3-arg overload, same pattern as the passing tests at lines 287-290: verify(httpLongPollingDataChangedListener, times(1)).onPluginChanged(anyList(), any(), any()); Lines 386/405 use `never()` on the 2-arg overload, which is trivially true for the same reason and worth aligning as well. -- 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]
