Skip to content
This repository has been archived by the owner on Feb 20, 2018. It is now read-only.

Commit

Permalink
Remove sleeps from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanislav Zubov authored and Stanislav Zubov committed Jan 19, 2016
1 parent cb33932 commit 932be3d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/unit/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8

import BaseHTTPServer
import copy
import json
Expand All @@ -8,8 +9,10 @@
import socket
import unittest

from nose.twistedtools import reactor
from mock import Mock, patch
from nose.twistedtools import reactor

from core.utils.network_utils import get_socket


class TimeoutException(Exception):
Expand Down Expand Up @@ -87,8 +90,6 @@ def vmmaster_label(address, session, label=None):
"/wd/hub/session/%s/vmmaster/vmmasterLabel" % str(session),
body=json.dumps({"label": label}))

from core.utils.network_utils import get_socket


def server_is_up(address, wait=5):
s = get_socket(address[0], address[1])
Expand Down Expand Up @@ -230,5 +231,4 @@ def vmmaster_server_mock(port):


def request_mock(**kwargs):
time.sleep(2)
return Mock(status_code=200, headers={}, content=json.dumps({'status': 0}))
1 change: 0 additions & 1 deletion tests/unit/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@ def get_vm_mock(arg):
response = new_session_request(self.address, self.desired_caps)

self.assertEqual(200, response.status)
time.sleep(2)

response = get_session_request(self.address, 1)
self.assertIn(
Expand Down

0 comments on commit 932be3d

Please sign in to comment.