diff --git a/test_set/cvp-sanity/global_config.yaml b/test_set/cvp-sanity/global_config.yaml
index 4146147..ab593d7 100644
--- a/test_set/cvp-sanity/global_config.yaml
+++ b/test_set/cvp-sanity/global_config.yaml
@@ -90,6 +90,4 @@
 
 # ntp test setting
 # this test may skip specific node (use fqdn)
-test_ntp_sync:
-  { #"skipped_nodes": [""],
-    "time_deviation": 1}
+ntp_skipped_nodes: [""]
diff --git a/test_set/cvp-sanity/tests/test_ntp_sync.py b/test_set/cvp-sanity/tests/test_ntp_sync.py
index 23a98a3..3636f14 100644
--- a/test_set/cvp-sanity/tests/test_ntp_sync.py
+++ b/test_set/cvp-sanity/tests/test_ntp_sync.py
@@ -1,39 +1,34 @@
 import json
-import os
-
 import utils
 
 
 def test_ntp_sync(local_salt_client):
-    testname = os.path.basename(__file__).split('.')[0]
-    active_nodes = utils.get_active_nodes(os.path.basename(__file__))
+    """Test checks that system time is the same across all nodes"""
+
+    active_nodes = utils.get_active_nodes()
     config = utils.get_configuration()
-    fail = {}
-    saltmaster_time = int(local_salt_client.cmd(
-        'salt:master',
-        'cmd.run',
-        ['date +%s'],
-        expr_form='pillar').values()[0])
     nodes_time = local_salt_client.cmd(
         utils.list_to_target_string(active_nodes, 'or'),
         'cmd.run',
         ['date +%s'],
         expr_form='compound')
-    diff = config.get(testname)["time_deviation"] or 30
+    result = {}
     for node, time in nodes_time.iteritems():
-        if (int(time) - saltmaster_time) > diff or \
-                (int(time) - saltmaster_time) < -diff:
-            fail[node] = time
-
-    assert not fail, 'SaltMaster time: {}\n' \
-                     'Nodes with time mismatch:\n {}'.format(saltmaster_time,
-                                                             fail)
+        if node in config.get("ntp_skipped_nodes"):
+            continue
+        if time in result:
+            result[time].append(node)
+            result[time].sort()
+        else:
+            result[time] = [node]
+    assert len(result) <= 1, 'Not all nodes have the same time:\n {}'.format(
+                             json.dumps(result, indent=4))
 
 
 def test_ntp_peers_state(local_salt_client):
-    """Test gets ntpq peers state and check the system peer is declared"""
+    """Test gets ntpq peers state and checks the system peer is declared"""
 
-    active_nodes = utils.get_active_nodes(os.path.basename(__file__))
+    active_nodes = utils.get_active_nodes()
     state = local_salt_client.cmd(
         utils.list_to_target_string(active_nodes, 'or'),
         'cmd.run',
