Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and enable test accoring to #1716 #486

Merged
merged 22 commits into from
Oct 6, 2023
Merged

Conversation

voodam
Copy link
Contributor

@voodam voodam commented Jul 7, 2023

  • burst messages can exceed the limit x2, so we need to assert range
  • connection_* frang limits (will be renamed to tcp_connection_*) affect any connection (both TLS and non TLS), so rework FrangConnectionTlsAndNonTlsRateBurst
  • rename testcases for better readability

@voodam
Copy link
Contributor Author

voodam commented Jul 9, 2023

It seems we need to merge broken tests because of config directives renaming. We can't redefine both branches of tempesta and tempesta-tests for now, as I know.

Copy link
Contributor

@RomanBelozerov RomanBelozerov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FAIL: test_connection_burst (t_frang.test_connection_rate_burst.FrangTls)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/other/tempesta-test/t_frang/test_connection_rate_burst.py", line 131, in test_connection_burst
    self._base_burst_scenario(connections=11)
  File "/mnt/other/tempesta-test/t_frang/test_connection_rate_burst.py", line 92, in _base_burst_scenario
    self.assertConnReseted(curl.last_response)
  File "/mnt/other/tempesta-test/t_frang/frang_test_case.py", line 108, in assertConnReseted
    self.assertEqual(r.status, 0)
AssertionError: 200 != 0
FAIL: test_connection_burst (t_frang.test_connection_rate_burst.FrangTcp)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/mnt/other/tempesta-test/t_frang/test_connection_rate_burst.py", line 131, in test_connection_burst
    self._base_burst_scenario(connections=11)
  File "/mnt/other/tempesta-test/t_frang/test_connection_rate_burst.py", line 89, in _base_burst_scenario
    self.assertFrangWarning(warning=self.burst_warning, expected=warning_count)
  File "/mnt/other/tempesta-test/t_frang/frang_test_case.py", line 119, in assertFrangWarning
    self.assertTrue(test_value, self.assert_msg.format(exp=expected, got=warning_count))
AssertionError: False is not true : Expected nums of warnings in `journalctl`: range(1, 6), but got 10

t_frang/test_connection_rate_burst.py Outdated Show resolved Hide resolved
t_frang/test_connection_rate_burst.py Outdated Show resolved Hide resolved
t_frang/test_connection_rate_burst.py Show resolved Hide resolved
@voodam voodam force-pushed the am-1716-tls-conn-burst branch 2 times, most recently from 1e3b4b2 to 782d55e Compare July 11, 2023 19:20
@voodam
Copy link
Contributor Author

voodam commented Jul 11, 2023

@voodam voodam force-pushed the am-1716-tls-conn-burst branch 8 times, most recently from e38a0fb to 7052565 Compare July 18, 2023 11:41
@voodam voodam force-pushed the am-1716-tls-conn-burst branch 3 times, most recently from b218856 to 99cbbcb Compare September 7, 2023 08:50
- It created several times in Frang testcases before
- It called sysctl even if message_cost is disabled already
- It restored the original message_cost value in random time (when destuctor called)

Some that cases (I don't know what exactly and how) led to the behaviour when
messages was suppressed anyway.
IP confusling:
- regression.test_invalid.TestInvalidResponse.test_204_with_body
- regression.test_invalid.TestInvalidResponse.test_no_crlf_before_body
- tcp_connection.test_connection_close.CloseConnection.test

Flacking ones:
- t_frang.test_request_rate_burst.FrangRequestBurstTestCase.test_two_clients_one_ip
- t_frang.test_request_rate_burst.FrangRequestBurstTestCase.test_two_clients_two_ip
- t_frang.test_request_rate_burst.FrangRequestRateTestCase.test_two_clients_one_ip
- t_frang.test_request_rate_burst.FrangRequestRateTestCase.test_two_clients_two_ip
- Add getsockname info logging
- Make output more uniform
@voodam voodam force-pushed the am-1716-tls-conn-burst branch 4 times, most recently from 6a89483 to 1b28904 Compare October 3, 2023 20:28
t_frang/frang_test_case.py Outdated Show resolved Hide resolved
t_frang/frang_test_case.py Outdated Show resolved Hide resolved
helpers/dmesg.py Outdated Show resolved Hide resolved
helpers/dmesg.py Outdated Show resolved Hide resolved
t_frang/frang_test_case.py Outdated Show resolved Hide resolved
Add --from-failstr parameter, example of usage:
./run_tests.py -F 'FAIL: test_connection_burst (t_frang.test_connection_rate_burst.FrangTls)'
- Main motivation wait_until moved under the hood of warn_count() (renamed to find()).
  This leads to changing signature - we need predicate to have valid poll condition.
- Refactoring: renamed some arguments and methods.
- Removed unused and unnecessary methods.
@voodam voodam merged commit ea3ee60 into master Oct 6, 2023
1 check was pending
@RomanBelozerov RomanBelozerov deleted the am-1716-tls-conn-burst branch November 7, 2023 07:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants