[Box Backup-dev] COMMIT r921 - box/chris/merge/test/backupstore

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Fri Sep 1 09:08:11 BST 2006


Author: chris
Date: 2006-09-01 09:08:11 +0100 (Fri, 01 Sep 2006)
New Revision: 921

Modified:
   box/chris/merge/test/backupstore/testbackupstore.cpp
Log:
(refs #3)

We cannot open multiple connections to the server on Win32, so work around.


Modified: box/chris/merge/test/backupstore/testbackupstore.cpp
===================================================================
--- box/chris/merge/test/backupstore/testbackupstore.cpp	2006-09-01 08:05:29 UTC (rev 920)
+++ box/chris/merge/test/backupstore/testbackupstore.cpp	2006-09-01 08:08:11 UTC (rev 921)
@@ -931,6 +931,7 @@
 		// Check marker is 0
 		TEST_THAT(loginConf->GetClientStoreMarker() == 0);
 
+#ifndef WIN32
 		// Check that we can't open a new connection which requests write permissions
 		{
 			SocketStreamTLS conn;
@@ -942,10 +943,12 @@
 				ConnectionException, Conn_Protocol_UnexpectedReply);
 			protocol.QueryFinished();
 		}
+#endif
 		
 		// Set the client store marker
 		protocol.QuerySetClientStoreMarker(0x8732523ab23aLL);
 
+#ifndef WIN32
 		// Open a new connection which is read only
 		SocketStreamTLS connReadOnly;
 		connReadOnly.Open(context, Socket::TypeINET, hostname, BOX_PORT_BBSTORED);
@@ -964,10 +967,12 @@
 			// Check client store marker
 			TEST_THAT(loginConf->GetClientStoreMarker() == 0x8732523ab23aLL);
 		}
+#else // WIN32
+		BackupProtocolClient& protocolReadOnly(protocol);
+#endif
 
 		test_server_1(protocol, protocolReadOnly);
 
-
 		// Create and upload some test files
 		int64_t maxID = 0;
 		for(int t = 0; t < UPLOAD_NUM; ++t)
@@ -1439,11 +1444,15 @@
 		}
 			
 		// Finish the connections
+#ifndef WIN32
 		protocolReadOnly.QueryFinished();
+#endif
 		protocol.QueryFinished();
 		
 		// Close logs
+#ifndef WIN32
 		::fclose(protocolReadOnlyLog);
+#endif
 		::fclose(protocolLog);
 	}
 	




More information about the Boxbackup-dev mailing list