summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2016-09-23 11:28:10 +0200
committerBenoit Foucher <benoit@zeroc.com>2016-09-23 11:28:10 +0200
commit93144c8b87e620892fd6f5c0edeb0f3bb819f788 (patch)
tree3ec787c05f9c790d8b485aec7cdd8a0b80c2bebd /cpp/test
parentFixed potential IceStorm/stress test failures (diff)
downloadice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.tar.bz2
ice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.tar.xz
ice-93144c8b87e620892fd6f5c0edeb0f3bb819f788.zip
Fixed ICE-7230 - Issue with adpater IDs with spaces
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/IceGrid/deployer/AllTests.cpp31
-rw-r--r--cpp/test/IceGrid/deployer/application.xml10
2 files changed, 21 insertions, 20 deletions
diff --git a/cpp/test/IceGrid/deployer/AllTests.cpp b/cpp/test/IceGrid/deployer/AllTests.cpp
index 8c10a87d5df..e4dda4f4f8a 100644
--- a/cpp/test/IceGrid/deployer/AllTests.cpp
+++ b/cpp/test/IceGrid/deployer/AllTests.cpp
@@ -19,7 +19,7 @@ using namespace std;
using namespace Test;
using namespace IceGrid;
-namespace
+namespace
{
void
@@ -65,7 +65,7 @@ public:
{
}
- bool
+ bool
operator()(const Ice::ObjectPrx& p1, const string& id) const
{
return p1->ice_getIdentity() == _communicator->stringToIdentity(id);
@@ -171,7 +171,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
test(it->read(1024, lines) && lines.empty());
test(it->read(1024, lines) && lines.empty());
it->destroy();
-
+
it = session->openServerLog("LogServer", testDir + "/log2.txt", 1);
test(it->read(1024, lines) && lines.size() == 1);
test(lines[0] == "one line file with no EOL on last line");
@@ -194,7 +194,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
{
//
// Test with log file with one line with EOL on last line.
- //
+ //
string path = testDir + "/log3.txt";
ofstream os(path.c_str());
os << "one line file with EOL on last line" << endl;
@@ -211,7 +211,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
test(it->read(1024, lines) && lines.empty());
test(it->read(1024, lines) && lines.empty());
it->destroy();
-
+
it = session->openServerLog("LogServer", testDir + "/log3.txt", 1);
test(it->read(1024, lines) && lines.size() == 2);
test(lines[0] == "one line file with EOL on last line");
@@ -262,7 +262,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
test(it->read(1024, lines) && lines.empty());
test(it->read(1024, lines) && lines.empty());
it->destroy();
-
+
it = session->openServerLog("LogServer", testDir + "/log4.txt", 1);
test(it->read(1024, lines) && lines.size() == 2);
test(lines[0] == "line 3");
@@ -325,7 +325,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
test(it->read(1024, lines) && lines.empty());
os << endl;
test(it->read(1024, lines) && lines.size() == 2 && lines[0].empty() && lines[1].empty());
-
+
os << "starting multiple long line now, " << flush;
test(it->read(1024, lines) && lines.size() == 1 && lines[0] == "starting multiple long line now, ");
writeLongLine(os);
@@ -357,7 +357,7 @@ logTests(const Ice::CommunicatorPtr& comm, const AdminSessionPrx& session)
test(it->read(1024, lines) && lines.size() == 2 && isLongLineEnd(lines[0]) && lines[1].empty());
test(it->read(1024, lines) && lines.empty());
it->destroy();
-
+
it = session->openServerLog("LogServer", testDir + "/log1.txt", 2);
test(!it->read(1024, lines) && lines.size() == 1 && isLongLineStart(lines[0]));
test(!it->read(1024, lines) && lines.size() == 1 && isLongLineContent(lines[0]));
@@ -414,6 +414,7 @@ allTests(const Ice::CommunicatorPtr& comm)
test(find(adapterIds.begin(), adapterIds.end(), "IceBox2Service2Adapter") != adapterIds.end());
test(find(adapterIds.begin(), adapterIds.end(), "SimpleIceBox.SimpleService.SimpleService") != adapterIds.end());
test(find(adapterIds.begin(), adapterIds.end(), "ReplicatedAdapter") != adapterIds.end());
+ test(find(adapterIds.begin(), adapterIds.end(), "ReplicatedAdapter 2") != adapterIds.end());
cout << "ok" << endl;
cout << "testing object registration... " << flush;
@@ -532,7 +533,7 @@ allTests(const Ice::CommunicatorPtr& comm)
test(obj->getProperty("NameEscaped") == "${name}");
test(obj->getProperty("NameEscapeEscaped") == "$Server1");
test(obj->getProperty("NameEscapedEscapeEscaped") == "$${name}");
- test(obj->getProperty("ManyEscape") == "$$$${name}");
+ test(obj->getProperty("ManyEscape") == "$$$${name}");
test(obj->getProperty("TestServer1Identity") == "Server1");
test(obj->getProperty("LogFilePath") == "test-Server1.log");
test(obj->getProperty("LogFilePath-Server1") == "test.log");
@@ -588,7 +589,7 @@ allTests(const Ice::CommunicatorPtr& comm)
obj = TestIntfPrx::checkedCast(
comm->stringToProxy("SimpleIceBox-SimpleService@SimpleIceBox.SimpleService.SimpleService"));
proxies.push_back(obj);
-
+
for(vector<TestIntfPrx>::const_iterator p = proxies.begin(); p != proxies.end(); ++p)
{
test((*p)->getProperty("AppVarProp") == "AppVar");
@@ -635,7 +636,7 @@ allTests(const Ice::CommunicatorPtr& comm)
obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox2-Service2@IceBox2Service2Adapter"));
test(obj->getProperty("AppVarOverridedByParamProp") == "Test");
test(obj->getProperty("NodeVarOverridedByParamProp") == "Test");
-
+
cout << "ok" << endl;
cout << "testing descriptions... " << flush;
@@ -656,7 +657,7 @@ allTests(const Ice::CommunicatorPtr& comm)
test(info.descriptor->adapters[0].description == "ADAPTER NodeVar");
test(info.descriptor->dbEnvs[0].description == "DBENV NodeVar");
cout << "ok" << endl;
-
+
cout << "testing property sets..." << flush;
obj = TestIntfPrx::checkedCast(comm->stringToProxy("Server1@Server1.Server"));
test(obj->getProperty("AppProperty") == "AppVar");
@@ -684,7 +685,7 @@ allTests(const Ice::CommunicatorPtr& comm)
test(obj->getProperty("NodeProperty") == "NodeVar");
test(obj->getProperty("IceBoxInstanceProperty") == "IceBox2");
- obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox2-Service2@IceBox2Service2Adapter"));
+ obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox2-Service2@IceBox2Service2Adapter"));
test(obj->getProperty("AppProperty") == "AppVar");
test(obj->getProperty("AppProperty2") == "OverrideMe");
test(obj->getProperty("AppProperty21") == "Override");
@@ -697,7 +698,7 @@ allTests(const Ice::CommunicatorPtr& comm)
test(obj->getProperty("AppProperty2") == "OverrideMe");
test(obj->getProperty("AppProperty21") == "Override");
test(obj->getProperty("NodeProperty") == "NodeVar");
-
+
obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox1-Service1@IceBox1.Service1.Service1"));
test(obj->getProperty("ServerInstanceServiceProperty") == "service1");
obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox1-Service4@IceBox1.Service4.Service4"));
@@ -757,7 +758,7 @@ allTestsWithTarget(const Ice::CommunicatorPtr& comm)
test(admin);
cout << "testing targets... " << flush;
-
+
TestIntfPrx obj = TestIntfPrx::checkedCast(comm->stringToProxy("Server3@Server3.Server"));
obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox3-Service1@IceBox3.Service1.Service1"));
obj = TestIntfPrx::checkedCast(comm->stringToProxy("IceBox3-Service3@IceBox3.Service3.Service3"));
diff --git a/cpp/test/IceGrid/deployer/application.xml b/cpp/test/IceGrid/deployer/application.xml
index 56c47a90a24..27a5a44b201 100644
--- a/cpp/test/IceGrid/deployer/application.xml
+++ b/cpp/test/IceGrid/deployer/application.xml
@@ -16,14 +16,14 @@
<!-- Include server templates -->
<include file="icebox.xml"/>
- <include file="server.xml"/>
+ <include file="server.xml"/>
<replica-group id="ReplicatedAdapter">
<description>REPLICA GROUP ${AppVar}</description>
<object identity="ReplicatedObject" type="::Test"/>
</replica-group>
- <replica-group id="ReplicatedAdapter2" proxy-options="-e 1.4">
+ <replica-group id="ReplicatedAdapter 2" proxy-options="-e 1.4">
<description>REPLICA GROUP ${AppVar}</description>
<object identity="ReplicatedObject15" type="::Test" proxy-options="-e 1.5"/>
<object identity="ReplicatedObject14" type="::Test"/>
@@ -38,7 +38,7 @@
<variable name="EscapedAppVar" value="$${escaped}"/>
<variable name="RecursiveEscapedAppVar" value="${EscapedAppVar}"/>
<variable name="Recursive2EscapedAppVar" value="${RecursiveEscapedAppVar}"/>
- <variable name="test.dir" value="NotThisValue"/>
+ <variable name="test.dir" value="NotThisValue"/>
<variable name="encoding10" value="1.0"/>
<variable name="encoding12" value="1.2"/>
@@ -63,7 +63,7 @@
<property name="NodeProperty" value="${NodeVar}"/>
<property name="AppProperty21" value="Override"/>
</properties>
-
+
<!-- Variables for variable test -->
<variable name="NodeVar" value="NodeVar"/>
<variable name="AppVarOverrided" value="OverridedInNode"/>
@@ -77,7 +77,7 @@
<server-instance template="IceBoxTemplate" name="IceBox1" AppVarOverridedByParam="Overrided">
<properties service="Service1">
- <property name="ServerInstanceServiceProperty" value="service1"/>
+ <property name="ServerInstanceServiceProperty" value="service1"/>
</properties>
<properties service="Service4">
<property name="ServerInstanceServiceProperty" value="service4"/>