本文整理汇总了C++中TestIntfPrx::getServerFile方法的典型用法代码示例。如果您正苦于以下问题:C++ TestIntfPrx::getServerFile方法的具体用法?C++ TestIntfPrx::getServerFile怎么用?C++ TestIntfPrx::getServerFile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TestIntfPrx
的用法示例。
在下文中一共展示了TestIntfPrx::getServerFile方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: test
void
allTests(const Ice::CommunicatorPtr& communicator)
{
RegistryPrx registry = IceGrid::RegistryPrx::checkedCast(communicator->stringToProxy("IceGrid/Registry"));
test(registry);
AdminSessionPrx session = registry->createAdminSession("foo", "bar");
SessionKeepAliveThreadPtr keepAlive = new SessionKeepAliveThread(session, registry->getSessionTimeout()/2);
keepAlive->start();
AdminPrx admin = session->getAdmin();
test(admin);
cout << "testing distributions... " << flush;
{
admin->startServer("Test.IcePatch2");
admin->startServer("IcePatch2-Direct");
TestIntfPrx test;
test = TestIntfPrx::uncheckedCast(communicator->stringToProxy("server-all"));
test(test->getServerFile("rootfile") == "");
try
{
admin->patchServer("server-all", true);
}
catch(const PatchException& ex)
{
copy(ex.reasons.begin(), ex.reasons.end(), ostream_iterator<string>(cerr, "\n"));
test(false);
}
test(test->getServerFile("rootfile") == "rootfile");
test(test->getServerFile("dir1/file1") == "dummy-file1");
test(test->getServerFile("dir1/file2") == "dummy-file2");
test(test->getServerFile("dir2/file3") == "dummy-file3");
test(test->getApplicationFile("rootfile") == "");
test(test->getApplicationFile("dir1/file1") == "");
test(test->getApplicationFile("dir1/file2") == "");
test(test->getApplicationFile("dir2/file3") == "dummy-file3");
test = TestIntfPrx::uncheckedCast(communicator->stringToProxy("server-all-direct"));
test(test->getServerFile("rootfile") == "");
test(test->getServerFile("dir1/file1") == "");
test(test->getServerFile("dir1/file2") == "");
test(test->getServerFile("dir2/file3") == "");
test(test->getApplicationFile("rootfile") == "");
test(test->getApplicationFile("dir1/file1") == "");
test(test->getApplicationFile("dir1/file2") == "");
test(test->getApplicationFile("dir2/file3") == "dummy-file3");
try
{
admin->patchServer("server-all-direct", true);
}
catch(const PatchException& ex)
{
copy(ex.reasons.begin(), ex.reasons.end(), ostream_iterator<string>(cerr, "\n"));
test(false);
}
test(test->getServerFile("rootfile") == "rootfile");
test(test->getServerFile("dir1/file1") == "dummy-file1");
test(test->getServerFile("dir1/file2") == "dummy-file2");
test(test->getServerFile("dir2/file3") == "dummy-file3");
test(test->getApplicationFile("rootfile") == "");
test(test->getApplicationFile("dir1/file1") == "");
test(test->getApplicationFile("dir1/file2") == "");
test(test->getApplicationFile("dir2/file3") == "dummy-file3");
try
{
admin->patchApplication("Test", true);
}
catch(const PatchException& ex)
{
copy(ex.reasons.begin(), ex.reasons.end(), ostream_iterator<string>(cerr, "\n"));
test(false);
}
test = TestIntfPrx::uncheckedCast(communicator->stringToProxy("server-dir1"));
test(test->getServerFile("rootfile") == "");
test(test->getServerFile("dir1/file1") == "dummy-file1");
test(test->getServerFile("dir1/file2") == "dummy-file2");
test(test->getServerFile("dir2/file3") == "");
test(test->getApplicationFile("rootfile") == "");
test(test->getApplicationFile("dir1/file1") == "");
test(test->getApplicationFile("dir1/file2") == "");
test(test->getApplicationFile("dir2/file3") == "dummy-file3");
admin->stopServer("Test.IcePatch2");
admin->stopServer("IcePatch2-Direct");
}
cout << "ok" << endl;
//.........这里部分代码省略.........