summaryrefslogtreecommitdiff
path: root/test/backupstorepatch/testbackupstorepatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/backupstorepatch/testbackupstorepatch.cpp')
-rw-r--r--test/backupstorepatch/testbackupstorepatch.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/backupstorepatch/testbackupstorepatch.cpp b/test/backupstorepatch/testbackupstorepatch.cpp
index 42594652..96b93308 100644
--- a/test/backupstorepatch/testbackupstorepatch.cpp
+++ b/test/backupstorepatch/testbackupstorepatch.cpp
@@ -345,12 +345,13 @@ int test(int argc, const char *argv[])
{
// Open a connection to the server
- SocketStreamTLS conn;
- conn.Open(context, Socket::TypeINET, "localhost",
+ SocketStreamTLS *pConn = new SocketStreamTLS;
+ std::auto_ptr<SocketStream> apConn(pConn);
+ pConn->Open(context, Socket::TypeINET, "localhost",
BOX_PORT_BBSTORED_TEST);
// Make a protocol
- BackupProtocolClient protocol(conn);
+ BackupProtocolClient protocol(apConn);
// Login
{
@@ -454,7 +455,6 @@ int test(int argc, const char *argv[])
// Finish the connection
protocol.QueryFinished();
- conn.Close();
}
// Fill in initial dependency information
@@ -528,10 +528,11 @@ int test(int argc, const char *argv[])
}
// Open a connection to the server (need to do this each time, otherwise housekeeping won't delete files)
- SocketStreamTLS conn;
- conn.Open(context, Socket::TypeINET, "localhost",
+ SocketStreamTLS *pConn = new SocketStreamTLS;
+ std::auto_ptr<SocketStream> apConn(pConn);
+ pConn->Open(context, Socket::TypeINET, "localhost",
BOX_PORT_BBSTORED_TEST);
- BackupProtocolClient protocol(conn);
+ BackupProtocolClient protocol(apConn);
{
std::auto_ptr<BackupProtocolVersion> serverVersion(protocol.QueryVersion(BACKUP_STORE_SERVER_VERSION));
TEST_THAT(serverVersion->GetVersion() == BACKUP_STORE_SERVER_VERSION);
@@ -583,7 +584,6 @@ int test(int argc, const char *argv[])
// Close the connection
protocol.QueryFinished();
- conn.Close();
// Mark one of the elements as deleted
if(test_file_remove_order[deleteIndex] == -1)