wsd: new test to validate recovery after kit crash
Change-Id: I406e5b72f6edf46dfde5da8c07daed21aef8b130
This commit is contained in:
parent
eab17f4496
commit
58d3b7f9ff
1 changed files with 27 additions and 0 deletions
|
@ -57,12 +57,14 @@ class HTTPCrashTest : public CPPUNIT_NS::TestFixture
|
|||
|
||||
CPPUNIT_TEST(testBarren);
|
||||
CPPUNIT_TEST(testCrashKit);
|
||||
CPPUNIT_TEST(testRecoverAfterKitCrash);
|
||||
CPPUNIT_TEST(testCrashForkit);
|
||||
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
void testBarren();
|
||||
void testCrashKit();
|
||||
void testRecoverAfterKitCrash();
|
||||
void testCrashForkit();
|
||||
|
||||
static
|
||||
|
@ -172,6 +174,31 @@ void HTTPCrashTest::testCrashKit()
|
|||
}
|
||||
}
|
||||
|
||||
void HTTPCrashTest::testRecoverAfterKitCrash()
|
||||
{
|
||||
const auto testname = "recoverAfterKitCrash ";
|
||||
try
|
||||
{
|
||||
auto socket = loadDocAndGetSocket("empty.odt", _uri, testname);
|
||||
|
||||
std::cerr << "Killing loolkit instances." << std::endl;
|
||||
|
||||
killLoKitProcesses("(loolkit)");
|
||||
countLoolKitProcesses(0);
|
||||
|
||||
// We expect the client connection to close.
|
||||
std::cerr << "Reconnect after kill." << std::endl;
|
||||
|
||||
auto socket2 = loadDocAndGetSocket("empty.odt", _uri, testname);
|
||||
sendTextFrame(socket2, "status", testname);
|
||||
assertResponseString(socket2, "status:", testname);
|
||||
}
|
||||
catch (const Poco::Exception& exc)
|
||||
{
|
||||
CPPUNIT_FAIL(exc.displayText());
|
||||
}
|
||||
}
|
||||
|
||||
void HTTPCrashTest::testCrashForkit()
|
||||
{
|
||||
const auto testname = "crashForkit ";
|
||||
|
|
Loading…
Reference in a new issue