Skip to content

Commit 17389fe

Browse files
authored
Fix configuration potential NPE in test (#1677)
1 parent b33e5e0 commit 17389fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

amqp-impl/src/test/java/io/streamnative/pulsar/handlers/amqp/test/AmqpProtocolTestBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ private void mockPulsarService() throws PulsarServerException {
138138
pulsarService = mock(PulsarService.class);
139139
PulsarAdmin adminClient = mock(PulsarAdmin.class);
140140
Namespaces namespaces = mock(Namespaces.class);
141-
ServiceConfiguration serviceConfiguration = mock(ServiceConfiguration.class);
141+
ServiceConfiguration serviceConfiguration = spy(new ServiceConfiguration());
142142
when(pulsarService.getAdminClient()).thenReturn(adminClient);
143143
when(pulsarService.getAdminClient().namespaces()).thenReturn(namespaces);
144144
when(pulsarService.getBrokerService()).then(new Answer<Object>() {

0 commit comments

Comments
 (0)