[Box Backup-commit] COMMIT r1006 - box/trunk/test/backupstore

boxbackup-dev at fluffy.co.uk boxbackup-dev at fluffy.co.uk
Thu Oct 12 23:23:32 BST 2006


Author: chris
Date: 2006-10-12 23:23:32 +0100 (Thu, 12 Oct 2006)
New Revision: 1006

Modified:
   box/trunk/test/backupstore/testbackupstore.cpp
Log:
 * We cannot open multiple connections to the server on Win32, so work around.


Modified: box/trunk/test/backupstore/testbackupstore.cpp
===================================================================
--- box/trunk/test/backupstore/testbackupstore.cpp	2006-10-12 22:23:06 UTC (rev 1005)
+++ box/trunk/test/backupstore/testbackupstore.cpp	2006-10-12 22:23:32 UTC (rev 1006)
@@ -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-commit mailing list