[ https://issues.apache.org/jira/browse/KNOX-3053?focusedWorklogId=927805&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-927805 ]
ASF GitHub Bot logged work on KNOX-3053: ---------------------------------------- Author: ASF GitHub Bot Created on: 29/Jul/24 14:56 Start Date: 29/Jul/24 14:56 Worklog Time Spent: 10m Work Description: hanicz opened a new pull request, #927: URL: https://github.com/apache/knox/pull/927 …od call ## What changes were proposed in this pull request? Moved the mock setup before the actual method call in testTopologyDiscoveryTriggerHandlesInvalidDescriptorContent(org.apache.knox.gateway.services.topology.DefaultTopologyServiceTest). ## How was this patch tested? Tests are passing locally. Please review [Knox Contributing Process](https://cwiki.apache.org/confluence/display/KNOX/Contribution+Process#ContributionProcess-GithubWorkflow) before opening a pull request. Issue Time Tracking ------------------- Worklog Id: (was: 927805) Remaining Estimate: 0h Time Spent: 10m > Fix DefaultTopologyServiceTest > ------------------------------ > > Key: KNOX-3053 > URL: https://issues.apache.org/jira/browse/KNOX-3053 > Project: Apache Knox > Issue Type: Test > Components: Tests > Affects Versions: 2.0.1 > Reporter: Philip Zampino > Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > org.apache.knox.gateway.services.topology.DefaultTopologyServiceTest#testTopologyDiscoveryTriggerHandlesInvalidDescriptorContent > > {code:java} > java.lang.NullPointerException > at > org.apache.knox.gateway.services.topology.DefaultTopologyServiceTest.testTopologyDiscoveryTriggerHandlesInvalidDescriptorContent(DefaultTopologyServiceTest.java:649) > > {code} > > This line in DefaultTopologyService class returns null because the mock setup > is done after the logic is actually called. > {code:java} > ClusterConfigurationMonitorService ccms = > gwServices.getService(ServiceType.CLUSTER_CONFIGURATION_MONITOR_SERVICE);{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)