EVENTUALLY(3, result = readDumpFile().find("hello\n") != string::npos; ); } TEST_METHOD(13) { // continueTransaction() does not reconnect to the server for a short // period of time if connecting failed factory->setReconnectTimeout(60 * 1000000); factory->setMaxConnectTries(1); factory2->setReconnectTimeout(60 * 1000000); factory2->setMaxConnectTries(1); SystemTime::forceAll(TODAY); LoggerPtr log = factory->newTransaction("foobar"); factory2->continueTransaction(log->getTxnId(), "foobar"); stopLoggingServer(); ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); SystemTime::forceAll(TODAY + 30 * 1000000); startLoggingServer(); ensure(factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); SystemTime::forceAll(TODAY + 61 * 1000000); ensure(!factory2->continueTransaction(log->getTxnId(), "foobar")->isNull()); } TEST_METHOD(14) { // If a client disconnects from the logging server then all its // transactions that are no longer referenced and have crash protection enabled // will be closed and written to the sink.