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

Check netem cmd sucess and pytest-timeout pkg existence #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

valeriy-zainullin
Copy link

@valeriy-zainullin valeriy-zainullin commented Nov 22, 2024

Изменения добавляют проверку успешности выполнения netem. В частности, отловим отсутствие утилиты tc, если кто запускает с мака или другой ОС.

Еще добавим проверку того, что пакет pytest-timeout установлен. Без него таймауты не работают (не должны работать), если кто-то запускает на локальном линуксе (правда, выйдет куча варнингов, что pytest.mark.timeout не зарегистрирован). Проверяется только при запуске через pytest, в функции настройки конфига (ее вызывает сам pytest).

Требуется проверить, что на маке отлавливается отсутствие netem и выходит сообщение, что надо запускать на линуксе. У меня мака нет, не могу проверить.

@valeriy-zainullin valeriy-zainullin marked this pull request as ready for review November 22, 2024 23:04
@valeriy-zainullin valeriy-zainullin force-pushed the check_netem_cmd_and_pytest-timeout branch from fc75ec0 to 21a2bf1 Compare November 22, 2024 23:06
Mostly useful for macos case. Because there's no netem, tests seem
to be flying on macs, while there's no real packet loss, reorder
or duplication.
@valeriy-zainullin valeriy-zainullin force-pushed the check_netem_cmd_and_pytest-timeout branch from 21a2bf1 to b9bc5ca Compare November 22, 2024 23:28
If that is not the case, timeouts won't be checked! Because the decorator
that specifies the timeout comes from a pytest plugin that is not installed.
pytest displays a warning in that case.
@valeriy-zainullin valeriy-zainullin force-pushed the check_netem_cmd_and_pytest-timeout branch from b9bc5ca to 72411ad Compare November 23, 2024 10:27
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.

1 participant