diff --git a/tests/integration/cli/restart_test.py b/tests/integration/cli/restart_test.py index 1d159190..93c52375 100644 --- a/tests/integration/cli/restart_test.py +++ b/tests/integration/cli/restart_test.py @@ -8,7 +8,9 @@ from nose.tools import nottest from dusty.compiler.spec_assembler import get_all_repos +from dusty import constants from dusty.source import Repo +from dusty.subprocess import check_output_demoted from ...testcases import DustyIntegrationTestCase from ...fixtures import specs_fixture_with_depends @@ -20,7 +22,7 @@ def setUp(self): self._set_up_fake_local_repo(path=repo.remote_path) self.run_command('bundles activate bundle-a bundle-b') self.run_command('up') - time.sleep(.1) + time.sleep(.5) self.up_complete_time = datetime.datetime.utcnow() def tearDown(self): @@ -36,6 +38,10 @@ def assertContainerHasRestarted(self, app_name): def assertContainerNotRestarted(self, app_name): self.assertFalse(self.container_has_restarted(app_name)) + def vm_current_time(self): + result = check_output_demoted(['docker-machine', 'ssh', constants.VM_MACHINE_NAME, 'date "+%Y-%m-%dT%X.%s"']) + return dateutil.parser.parse(result) + @nottest def container_has_restarted(self, app_name): inspected = self.inspect_container(app_name)