|
10 | 10 | 'minConsecutiveUncorrectableWithLossOfLink',
|
11 | 11 | 'laneMarkers'
|
12 | 12 | ]
|
13 |
| -# ErrorTypes = [ |
14 |
| -# 'minConsecutiveUncorrectableWithLossOfLink' |
15 |
| -# ] |
16 | 13 |
|
17 | 14 | @pytest.mark.parametrize('error_type', ErrorTypes)
|
18 | 15 | def test_fec_error_injection(snappi_api, # noqa F811
|
@@ -77,20 +74,19 @@ def test_fec_error_injection(snappi_api, # noqa F811
|
77 | 74 | wait(15, "For error insertion to start")
|
78 | 75 | # TODO For maxConsecutiveUncorrectableWithoutLossOfLink check link state on DUT
|
79 | 76 | flow_metrics = fetch_snappi_flow_metrics(api, ['IPv4 Traffic'])[0]
|
80 |
| - pytest_assert(flow_metrics.frames_tx > 0 and int(flow_metrics.frames_rx_rate) == 0, |
| 77 | + pytest_assert(flow_metrics.frames_tx > 0 and int(flow_metrics.loss) > 0, |
81 | 78 | "FAIL: Rx Port did not stop receiving packets after starting FEC Error Insertion")
|
82 | 79 | logger.info(' .. PASSED : Rx Port stopped receiving packets after starting FEC Error Insertion')
|
83 | 80 | logger.info('Stopping FEC Error Insertion')
|
84 | 81 | port1.StopFecErrorInsertion()
|
85 | 82 | wait(15, "For error insertion to stop")
|
86 |
| - |
| 83 | + ixnet.ClearStats() |
87 | 84 | flow_metrics = fetch_snappi_flow_metrics(api, ['IPv4 Traffic'])[0]
|
88 |
| - pytest_assert(int(flow_metrics.frames_rx_rate) > 0, |
| 85 | + pytest_assert(int(flow_metrics.frames_rx_rate) > 0 and int(flow_metrics.loss) == 0, |
89 | 86 | "FAIL: Rx Port did not resume receiving packets after stopping FEC Error Insertion")
|
90 | 87 | logger.info(' .. PASSED : Rx Port resumed receiving packets after stopping FEC Error Insertion')
|
91 | 88 | logger.info('Stopping Traffic ...')
|
92 | 89 | ts = api.control_state()
|
93 | 90 | ts.traffic.flow_transmit.state = ts.traffic.flow_transmit.STOP
|
94 | 91 | api.set_control_state(ts)
|
95 | 92 | wait(10, "For traffic to stop")
|
96 |
| - |
0 commit comments