summaryrefslogtreecommitdiff
path: root/cpp/test/IceStorm/single/Subscriber.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2014-10-28 17:15:41 -0400
committerBernard Normier <bernard@zeroc.com>2014-10-28 17:15:41 -0400
commite395c983470b6cea32b165740ede454b95c5bea4 (patch)
tree01bc882362e104e1a05fb933e28bd3db2fbaa7bc /cpp/test/IceStorm/single/Subscriber.cpp
parentFixed ICE-5676: changed OA create exception to CommunicatorDestroyedException... (diff)
downloadice-e395c983470b6cea32b165740ede454b95c5bea4.tar.bz2
ice-e395c983470b6cea32b165740ede454b95c5bea4.tar.xz
ice-e395c983470b6cea32b165740ede454b95c5bea4.zip
Fixed IceStorm single test
Diffstat (limited to 'cpp/test/IceStorm/single/Subscriber.cpp')
-rw-r--r--cpp/test/IceStorm/single/Subscriber.cpp71
1 files changed, 1 insertions, 70 deletions
diff --git a/cpp/test/IceStorm/single/Subscriber.cpp b/cpp/test/IceStorm/single/Subscriber.cpp
index ddb70f4101e..906a759a37f 100644
--- a/cpp/test/IceStorm/single/Subscriber.cpp
+++ b/cpp/test/IceStorm/single/Subscriber.cpp
@@ -140,76 +140,7 @@ run(int, char* argv[], const CommunicatorPtr& communicator)
//
vector<SingleIPtr> subscribers;
vector<Ice::Identity> subscriberIdentities;
- //
- // First we use the old deprecated API.
- //
- {
- subscribers.push_back(new SingleI(communicator, "default"));
- Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back());
- subscriberIdentities.push_back(object->ice_getIdentity());
- topic->subscribe(IceStorm::QoS(), object);
- }
- {
- subscribers.push_back(new SingleI(communicator, "oneway"));
- IceStorm::QoS qos;
- qos["reliability"] = "oneway";
- Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back());
- subscriberIdentities.push_back(object->ice_getIdentity());
- topic->subscribe(qos, object);
- }
- {
- subscribers.push_back(new SingleI(communicator, "twoway"));
- IceStorm::QoS qos;
- qos["reliability"] = "twoway";
- Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back());
- subscriberIdentities.push_back(object->ice_getIdentity());
- topic->subscribe(qos, object);
- }
- {
- subscribers.push_back(new SingleI(communicator, "batch"));
- IceStorm::QoS qos;
- qos["reliability"] = "batch";
- Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back());
- subscriberIdentities.push_back(object->ice_getIdentity());
- topic->subscribe(qos, object);
- }
- {
- subscribers.push_back(new SingleI(communicator, "twoway ordered")); // Ordered
- IceStorm::QoS qos;
- qos["reliability"] = "twoway ordered";
- Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back());
- subscriberIdentities.push_back(object->ice_getIdentity());
- topic->subscribe(qos, object);
- }
- {
- // Use a separate adapter to ensure a separate connection is used for the subscriber
- // (otherwise, if multiple UDP subscribers use the same connection we might get high
- // packet loss, see bug 1784).
- ObjectAdapterPtr adpt = communicator->createObjectAdapterWithEndpoints("UdpAdapter1", "udp");
- subscribers.push_back(new SingleI(communicator, "datagram"));
- IceStorm::QoS qos;
- qos["reliability"] = "oneway";
- Ice::ObjectPrx object = adpt->addWithUUID(subscribers.back())->ice_datagram();
- topic->subscribe(IceStorm::QoS(), object);
- subscriberIdentities.push_back(object->ice_getIdentity());
- adpt->activate();
- }
- {
- // Use a separate adapter to ensure a separate connection is used for the subscriber
- // (otherwise, if multiple UDP subscribers use the same connection we might get high
- // packet loss, see bug 1784).
- ObjectAdapterPtr adpt = communicator->createObjectAdapterWithEndpoints("UdpAdapter2", "udp");
- subscribers.push_back(new SingleI(communicator, "batch datagram"));
- IceStorm::QoS qos;
- qos["reliability"] = "batch";
- Ice::ObjectPrx object = adpt->addWithUUID(subscribers.back())->ice_datagram();
- topic->subscribe(IceStorm::QoS(), object);
- subscriberIdentities.push_back(object->ice_getIdentity());
- adpt->activate();
- }
- //
- // Next we use the new API call with the new proxy semantics.
- //
+
{
subscribers.push_back(new SingleI(communicator, "default"));
Ice::ObjectPrx object = adapter->addWithUUID(subscribers.back())->ice_oneway();