2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 14:07:59 +00:00
Commit Graph

11 Commits

Author SHA1 Message Date
Tom Krizek
5f85f63bf1 Mark the test_named_shutdown[rndc] test as xfail
It is currently affected by #4060, making the unstable as it
occassionally fails.
2023-07-04 12:58:16 +02:00
Tom Krizek
ceed694659 Use timeout for rndc status in shutdown test
Pass 5 second timeout to the rndc status command(s) to avoid hitting the
hard 10 second timeout from subprocess.call, which would result in an
unwanted exception that would only mask the real issue: if the rndc
status times out in this test, it is likely due to the server not
stopping as it should.
2023-07-04 12:58:16 +02:00
Tom Krizek
603c58ee28 Split shutdown test into separate test cases
The shutdown test attempts to shut down the server using two different
methods - rndc and sigterm. Use pytest.mark.parametrize to run these as
separate test cases for easier identification of failures.
2023-07-04 12:58:14 +02:00
Tom Krizek
dee49b7a1f Replace dnspython resolver.query with resolver.resolve
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.

This is an omission from 3b1756d450
2023-05-10 10:56:36 +02:00
Tom Krizek
836e6ed284 Ensure named always terminates in the shutdown test
Previously, if an exception would happen inside the `with` block, the
error handler would wait indefinitely for the process to end. That would
never happen, since the termination signal was never sent to named and
the test would get stuck.

Using the try-finally block ensures that the named process is always
killed and any exception or errors will be handled gracefully.
2023-05-10 10:56:22 +02:00
Tom Krizek
9d64f1c1ed Refactor shutdown test into more helper functions
Improve code readability by splitting the test into more functions. Some
could be re-used later on for more general-purpose subprocess handling
or named checks.
2023-05-10 10:56:19 +02:00
Ondřej Surý
54a3f09c8f Bump the requirement in the shutdown test to dnspython 2.0.0
The dnspython.Resolve.resolve() requires at least dnspython >= 2.0.0,
this wasn't enforced in the shutdown system test leading to infinite
loop waiting for the server start due to failing resolve() call.
2023-04-04 21:31:58 +02:00
Ondřej Surý
3b1756d450 Replace dnspython resolver.query() with resolver.resolve()
The resolver.query() has been deprecated in favor of resolver.resolve();
used that.
2023-04-04 16:22:26 +02:00
Ondřej Surý
4ec9c4a1db Cleanup the last Windows / MSC ifdefs and comments
Cleanup the remnants of MS Compiler bits from <isc/refcount.h>, printing
the information in named/main.c, and cleanup some comments about Windows
that no longer apply.

The bits in picohttpparser.{h,c} were left out, because it's not our
code.
2023-04-03 09:06:20 +00:00
Michal Nowak
3cd2cc6254 Adapt to Python scripts to black 23.1.0 2023-02-17 15:31:52 +01:00
Tom Krizek
f6409ee6ac Use common name convention for pytest files
It is better to use consistent file names to avoid issue with sorting
etc.

Using underscore in filenames as opposed to dash was chosen because it
seems more common in pytest/python to use underscore for filenames.

Also rename the bin/tests/system/timeouts/tests-tcp.py file to
bin/tests/system/timeouts/tests_tcp_timeouts.py to avoid pytest name
collision (there can't be two files named tests_tcp.py).
2022-12-21 13:40:09 +01:00