From f214929740bf6c1854c27b255d954f5a96519d5d Mon Sep 17 00:00:00 2001 From: "Daniel A. Wozniak" Date: Fri, 31 Aug 2018 12:32:24 -0700 Subject: [PATCH] Fix a flaky test and mark another as flaky --- tests/integration/modules/test_cp.py | 2 +- tests/integration/modules/test_ntp.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/modules/test_cp.py b/tests/integration/modules/test_cp.py index 28f68dc352..dc2b2faad9 100644 --- a/tests/integration/modules/test_cp.py +++ b/tests/integration/modules/test_cp.py @@ -616,4 +616,4 @@ class CPModuleTest(ModuleCase): os.unlink(tgt_cache_file) def test_envs(self): - self.assertEqual(self.run_function('cp.envs'), ['base', 'prod']) + self.assertEqual(sorted(self.run_function('cp.envs')), sorted(['base', 'prod'])) diff --git a/tests/integration/modules/test_ntp.py b/tests/integration/modules/test_ntp.py index ff8b2da2db..09eaed08e9 100644 --- a/tests/integration/modules/test_ntp.py +++ b/tests/integration/modules/test_ntp.py @@ -6,12 +6,13 @@ from __future__ import absolute_import # Import Salt Testing libs from tests.support.case import ModuleCase from tests.support.unit import skipIf -from tests.support.helpers import destructiveTest +from tests.support.helpers import destructiveTest, flaky # Import Salt Libs import salt.utils +@flaky @skipIf(not salt.utils.is_windows(), 'Tests for only Windows') class NTPTest(ModuleCase): '''