fine tune fixes for the race condition in server_test.go file