mirror of
https://github.com/isc-projects/bind9.git
synced 2026-03-26 12:23:04 -04:00
The TCP connection reset test starts mock UDP and TCP server which always returns empty DNS answer with TC bit set over UDP and resets the TCP connection after five seconds. When tested without the fix, the DNS query to 10.53.0.2 times out and the ns2 server hangs at shutdown.
25 lines
774 B
Python
25 lines
774 B
Python
############################################################################
|
|
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
|
|
#
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, you can obtain one at https://mozilla.org/MPL/2.0/.
|
|
#
|
|
# See the COPYRIGHT file distributed with this work for additional
|
|
# information regarding copyright ownership.
|
|
############################################################################
|
|
|
|
import os
|
|
import pytest
|
|
|
|
|
|
@pytest.fixture
|
|
def port(request):
|
|
# pylint: disable=unused-argument
|
|
env_port = os.getenv("PORT")
|
|
if env_port is None:
|
|
env_port = 5300
|
|
else:
|
|
env_port = int(env_port)
|
|
|
|
return env_port
|