summaryrefslogtreecommitdiff
path: root/bin/bbackupd/BackupClientContext.h
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2015-09-20 21:31:23 +0100
committerChris Wilson <chris+github@qwirx.com>2015-09-20 21:31:23 +0100
commit2cbdea2166057c3c3996e733d78048d528fa694e (patch)
tree9ce3c62ce763884772d482b4cee47b3a5781b837 /bin/bbackupd/BackupClientContext.h
parentdf1a19ece5c1d308c4d08a694309592aa566611f (diff)
Remove all timing dependency from test_ssl_keepalives().
This test has always been fragile, and usually fails on Travis for reasons unknown, so replace the log parsing and intercepts with simple mocking code. This doesn't cover 100% of what the old test did, including diff timer aborts and the number of blocks used by the uploaded files, but it should be completely robust.
Diffstat (limited to 'bin/bbackupd/BackupClientContext.h')
-rw-r--r--bin/bbackupd/BackupClientContext.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/bin/bbackupd/BackupClientContext.h b/bin/bbackupd/BackupClientContext.h
index 04af1645..df43a232 100644
--- a/bin/bbackupd/BackupClientContext.h
+++ b/bin/bbackupd/BackupClientContext.h
@@ -54,11 +54,16 @@ public:
bool TcpNiceMode
);
virtual ~BackupClientContext();
+
private:
BackupClientContext(const BackupClientContext &);
-public:
- virtual BackupProtocolCallable &GetConnection();
+public:
+ // GetConnection() will open a connection if none is currently open.
+ virtual BackupProtocolCallable& GetConnection();
+ // GetOpenConnection() will not open a connection, just return NULL if there is
+ // no connection already open.
+ virtual BackupProtocolCallable* GetOpenConnection() const;
void CloseAnyOpenConnection();
int GetTimeout() const;
BackupClientDeleteList &GetDeleteList();
@@ -167,7 +172,7 @@ public:
// Created: 04/19/2005
//
// --------------------------------------------------------------------------
- void SetKeepAliveTime(int iSeconds);
+ virtual void SetKeepAliveTime(int iSeconds);
// --------------------------------------------------------------------------
//