diff options
Diffstat (limited to 'container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java')
-rw-r--r-- | container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java b/container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java index 759509946ce..78e79da4b9f 100644 --- a/container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java +++ b/container-messagebus/src/test/java/com/yahoo/messagebus/shared/SharedDestinationSessionTestCase.java @@ -1,14 +1,12 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.messagebus.shared; -import com.yahoo.cloud.config.SlobroksConfig; import com.yahoo.jrt.ListenFailedException; import com.yahoo.jrt.slobrok.server.Slobrok; import com.yahoo.messagebus.*; import com.yahoo.messagebus.jdisc.test.MessageQueue; import com.yahoo.messagebus.jdisc.test.RemoteClient; import com.yahoo.messagebus.jdisc.test.ReplyQueue; -import com.yahoo.messagebus.jdisc.test.TestUtils; import com.yahoo.messagebus.network.rpc.RPCNetworkParams; import com.yahoo.messagebus.routing.Route; import com.yahoo.messagebus.test.SimpleMessage; @@ -100,7 +98,7 @@ public class SharedDestinationSessionTestCase { RemoteClient client = RemoteClient.newInstanceWithInternSlobrok(true); MessageQueue queue = new MessageQueue(); DestinationSessionParams params = new DestinationSessionParams().setMessageHandler(queue); - SharedDestinationSession session = newDestinationSession(client.slobroksConfig(), params); + SharedDestinationSession session = newDestinationSession(client.slobrokId(), params); Route route = Route.parse(session.connectionSpec()); assertTrue(client.sendMessage(new SimpleMessage("foo").setRoute(route)).isAccepted()); @@ -122,11 +120,11 @@ public class SharedDestinationSessionTestCase { } catch (ListenFailedException e) { fail(); } - return newDestinationSession(TestUtils.configFor(slobrok), new DestinationSessionParams()); + return newDestinationSession(slobrok.configId(), new DestinationSessionParams()); } - private static SharedDestinationSession newDestinationSession(SlobroksConfig slobroksConfig, DestinationSessionParams params) { - RPCNetworkParams netParams = new RPCNetworkParams().setSlobroksConfig(slobroksConfig); + private static SharedDestinationSession newDestinationSession(String slobrokId, DestinationSessionParams params) { + RPCNetworkParams netParams = new RPCNetworkParams().setSlobrokConfigId(slobrokId); MessageBusParams mbusParams = new MessageBusParams().addProtocol(new SimpleProtocol()); SharedMessageBus mbus = SharedMessageBus.newInstance(mbusParams, netParams); SharedDestinationSession session = mbus.newDestinationSession(params); |