Skip to content

Commit 1883c0a

Browse files
daalllguohan
authored andcommitted
[vs tests] Remove class-level flaky fixtures (#1189)
Signed-off-by: Danny Allen <[email protected]>
1 parent dc695fb commit 1883c0a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+0
-84
lines changed

tests/test_acl.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98

109
class BaseTestAcl(object):
@@ -188,7 +187,6 @@ def verify_acl_rule(self, dvs, field, value):
188187
assert False
189188

190189

191-
@pytest.mark.flaky
192190
class TestAcl(BaseTestAcl):
193191
def test_AclTableCreation(self, dvs, testlog):
194192
self.setup_db(dvs)
@@ -1375,7 +1373,6 @@ def test_AclRuleRedirectToNexthop(self, dvs, testlog):
13751373
dvs.set_interface_status("Ethernet4", "down")
13761374

13771375

1378-
@pytest.mark.flaky
13791376
class TestAclRuleValidation(BaseTestAcl):
13801377
""" Test class for cases that check if orchagent corectly validates
13811378
ACL rules input

tests/test_acl_ctrl.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76

8-
@pytest.mark.flaky
97
class TestPortChannelAcl(object):
108
def setup_db(self, dvs):
119
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_acl_egress_table.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76

8-
@pytest.mark.flaky
97
class TestEgressAclTable(object):
108
def setup_db(self, dvs):
119
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_acl_portchannel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76

8-
@pytest.mark.flaky
97
class TestPortChannelAcl(object):
108
def setup_db(self, dvs):
119
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_admin_status.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76

8-
@pytest.mark.flaky
97
class TestAdminStatus(object):
108
def setup_db(self, dvs):
119
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_crm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import pytest
77

88
from swsscommon import swsscommon
9-
from flaky import flaky
109

1110
def getCrmCounterValue(dvs, key, counter):
1211

@@ -65,7 +64,6 @@ def check_syslog(dvs, marker, err_log, expected_cnt):
6564
assert num.strip() >= str(expected_cnt)
6665

6766

68-
@pytest.mark.flaky
6967
class TestCrm(object):
7068
def test_CrmFdbEntry(self, dvs, testlog):
7169

tests/test_dirbcast.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
import pytest
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98

10-
@pytest.mark.flaky
119
class TestDirectedBroadcast(object):
1210
def test_DirectedBroadcast(self, dvs, testlog):
1311

tests/test_drop_counters.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76
# Supported drop counters
87
PORT_INGRESS_DROPS = 'PORT_INGRESS_DROPS'
@@ -59,7 +58,6 @@
5958
# FIXME: It is really annoying to have to re-run tests due to inconsistent timing, should
6059
# implement some sort of polling interface for checking ASIC/flex counter tables after
6160
# applying changes to config DB
62-
@pytest.mark.flaky
6361
class TestDropCounters(object):
6462
def setup_db(self, dvs):
6563
self.asic_db = swsscommon.DBConnector(1, dvs.redis_sock, 0)

tests/test_dtel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
import pytest
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98

10-
@pytest.mark.flaky
119
class TestDtel(object):
1210
def test_DtelGlobalAttribs(self, dvs, testlog):
1311

tests/test_fdb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import pytest
66

77
from swsscommon import swsscommon
8-
from flaky import flaky
98
from distutils.version import StrictVersion
109

1110
def create_entry(tbl, key, pairs):
@@ -28,7 +27,6 @@ def how_many_entries_exist(db, table):
2827
return len(tbl.getKeys())
2928

3029

31-
@pytest.mark.flaky
3230
class TestFdb(object):
3331
def test_FdbWarmRestartNotifications(self, dvs, testlog):
3432
dvs.setup_db()

tests/test_fdb_update.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
import pytest
66

77
from swsscommon import swsscommon
8-
from flaky import flaky
98
from distutils.version import StrictVersion
109

1110

12-
@pytest.mark.flaky
1311
class TestFdbUpdate(object):
1412
def create_entry(self, tbl, key, pairs):
1513
fvs = swsscommon.FieldValuePairs(pairs)

tests/test_interface.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestRouterInterface(object):
119
def setup_db(self, dvs):
1210
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_mirror.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
import time
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87
from distutils.version import StrictVersion
98

109

11-
@pytest.mark.flaky
1210
class TestMirror(object):
1311
def setup_db(self, dvs):
1412
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_mirror_ipv6_combined.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@
44
import time
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87
from distutils.version import StrictVersion
98

109
DVS_FAKE_PLATFORM = "broadcom"
1110

1211

13-
@pytest.mark.flaky
1412
class TestMirror(object):
1513
def setup_db(self, dvs):
1614
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_mirror_ipv6_separate.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
from distutils.version import StrictVersion
66

77
from swsscommon import swsscommon
8-
from flaky import flaky
98

109
DVS_FAKE_PLATFORM = "mellanox"
1110

1211

13-
@pytest.mark.flaky
1412
class TestMirror(object):
1513
def setup_db(self, dvs):
1614
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_mirror_policer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@
44
import time
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87
from distutils.version import StrictVersion
98

109

11-
@pytest.mark.flaky
1210
class TestMirror(object):
1311
def setup_db(self, dvs):
1412
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_nat.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os
77

88
from swsscommon import swsscommon
9-
from flaky import flaky
109

1110

1211
# FIXME: These tests depend on changes in sonic-buildimage, we need to reenable

tests/test_neighbor.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestNeighbor(object):
119
def setup_db(self, dvs):
1210
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_nhg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
import pytest
66

77
from swsscommon import swsscommon
8-
from flaky import flaky
98

109

11-
@pytest.mark.flaky
1210
class TestNextHopGroup(object):
1311
def test_route_nhg(self, dvs, testlog):
1412
config_db = swsscommon.DBConnector(swsscommon.CONFIG_DB, dvs.redis_sock, 0)

tests/test_pfc.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76
def getBitMaskStr(bits):
87

@@ -60,7 +59,6 @@ def getPortAttr(dvs, port_oid, port_attr):
6059
return ''
6160

6261

63-
@pytest.mark.flaky
6462
class TestPfc(object):
6563
def test_PfcAsymmetric(self, dvs, testlog):
6664

tests/test_policer.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import time
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestPolicer(object):
119
def test_PolicerBasic(self, dvs, testlog):
1210
dvs.setup_db()

tests/test_port.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestPort(object):
119
def test_PortMtu(self, dvs, testlog):
1210
pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_port_an.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestPortAutoNeg(object):
119
def test_PortAutoNegCold(self, dvs, testlog):
1210

tests/test_port_buffer_rel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
import pytest
33

44
from swsscommon import swsscommon
5-
from flaky import flaky
65

76

87
# The test check that the ports will be up, when the admin state is UP by conf db.
9-
@pytest.mark.flaky
108
class TestPortBuffer(object):
119
def test_PortsAreUpAfterBuffers(self, dvs, testlog):
1210
num_ports = 32

tests/test_port_config.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import pytest
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98

109
@pytest.yield_fixture
@@ -15,7 +14,6 @@ def port_config(request, dvs):
1514
dvs.runcmd("mv %s.bak %s" % (file_name, file_name))
1615

1716

18-
@pytest.mark.flaky
1917
class TestPortConfig(object):
2018

2119
def getPortName(self, dvs, port_vid):

tests/test_port_mac_learn.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestPortMacLearn(object):
119
def setup_db(self, dvs):
1210
self.pdb = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)

tests/test_portchannel.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,8 @@
44
import pytest
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98

10-
@pytest.mark.flaky
119
class TestPortchannel(object):
1210
def test_Portchannel(self, dvs, testlog):
1311

tests/test_qos_map.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import time
55

66
from swsscommon import swsscommon
7-
from flaky import flaky
87

98
CFG_DOT1P_TO_TC_MAP_TABLE_NAME = "DOT1P_TO_TC_MAP"
109
CFG_DOT1P_TO_TC_MAP_KEY = "AZURE"
@@ -24,7 +23,6 @@
2423
CFG_PORT_TABLE_NAME = "PORT"
2524

2625

27-
@pytest.mark.flaky
2826
class TestDot1p(object):
2927
def connect_dbs(self, dvs):
3028
self.asic_db = swsscommon.DBConnector(1, dvs.redis_sock, 0)

tests/test_route.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
import pytest
66

77
from swsscommon import swsscommon
8-
from flaky import flaky
98

109

11-
@pytest.mark.flaky
1210
class TestRoute(object):
1311
def setup_db(self, dvs):
1412
self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0)

tests/test_setro.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55

66
from pprint import pprint
77
from swsscommon import swsscommon
8-
from flaky import flaky
98

109

11-
@pytest.mark.flaky
1210
class TestSetRo(object):
1311
def test_SetReadOnlyAttribute(self, dvs, testlog):
1412

tests/test_sflow.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
import pytest
44

55
from swsscommon import swsscommon
6-
from flaky import flaky
76

87

9-
@pytest.mark.flaky
108
class TestSflow(object):
119
speed_rate_table = {
1210
"400000":"40000",

0 commit comments

Comments
 (0)