Tuukka Norri committed f35443a

Added logging to see why unit tests don't pass on Buildbot machine

Comments (0)

Files changed (5)


 	mDidDisconnect = NO;
 	if ([self checkDatabaseURI: &localError])
+		NSLog (@"Checking whether to connect.");
 		if (NO == [self isConnected])
+			NSLog (@"Making database interface connect.");
 			[self lazyInit];
 			[mDatabaseInterface connectAsync];


 - (void) connectAsync
 	[self prepareForConnecting];
+	NSLog (@"Making transaction handler connect.");
 	[mTransactionHandler connectAsync];


 	mAsync = YES;
 	NSDictionary* connectionDictionary = [self connectionDictionary];
+	NSLog (@"Making main connection connect.");
 	[mConnection connectAsync: connectionDictionary];
+	NSLog (@"Making notification connection connect.");
 	[mNotifyConnection connectAsync: connectionDictionary];


 	[connector setDelegate: self];
 	[connector setTraceFile: [mDelegate PGTSConnectionTraceFile: self]];
 	[[PGTSConnectionMonitor sharedInstance] monitorConnection: self];
+	NSLog (@"Making %@ connect.", [connector class]);
 	return [connector connect: connectionDictionary];


 - (void) finishedConnecting: (BOOL) status
+	NSLog (@"Finished connecting (%d).", status);
 	if (status)
 		//Resign ownership. mConnection needs to be set to NULL before calling delegate method.
 	//If the resolution succeeded, iterate addresses and try to connect to each. Stop when a server gets reached.
 	BOOL reachedServer = NO;
+	NSLog (@"Continuing from name resolution.");
 	if (streamError && streamError->domain)
 - (void) socketReady: (CFSocketCallBackType) callBackType
+	NSLog (@"Socket got ready.");
 	//Sometimes the wrong callback type gets called. We cope with this
 	//by checking against an expected type and re-enabling it if needed.
 	if (callBackType != mExpectedCallBack)
 		status = CFHostSetClient (mHost, &HostReady, &ctx);
 		CFHostScheduleWithRunLoop (mHost, runloop, kCFRunLoopCommonModes);
+		NSLog (@"Starting host info resolution.");
 		if (! CFHostStartInfoResolution (mHost, kCFHostAddresses, &mHostError))
 			[self continueFromNameResolution: &mHostError];
 - (void) negotiateConnection
+	NSLog (@"Beginning negotiation.");
 	if (mTraceFile)
 		PQtrace (mConnection, mTraceFile);