@@ -72,8 +72,8 @@ async def _do_flush(flush_resolver_cache):
72
72
@pytest .fixture (name = 'check_restore' )
73
73
def _check_restore (gate , call , flush_resolver_cache , gen_domain_name ):
74
74
async def _do_restore (domain : typing .Optional [str ] = None ):
75
- gate .to_server_pass ()
76
- gate .to_client_pass ()
75
+ await gate .to_server_pass ()
76
+ await gate .to_client_pass ()
77
77
78
78
if not domain :
79
79
domain = gen_domain_name ()
@@ -105,7 +105,7 @@ async def test_ok(call, gate):
105
105
106
106
@pytest .mark .skip (reason = 'corrupted data can still be valid' )
107
107
async def test_corrupt_data (call , gate , check_restore ):
108
- gate .to_client_corrupt_data ()
108
+ await gate .to_client_corrupt_data ()
109
109
response = await call ()
110
110
111
111
assert response .status == 500
@@ -119,7 +119,7 @@ async def test_cached_name(call, gate, check_restore, gen_domain_name):
119
119
assert response .status == 200
120
120
assert response .text == SUCCESS_RESOLVE
121
121
122
- gate .to_client_drop ()
122
+ await gate .to_client_drop ()
123
123
124
124
response = await call (resolve = name , check_query = CheckQuery .FROM_CACHE )
125
125
assert response .status == 200
@@ -128,7 +128,7 @@ async def test_cached_name(call, gate, check_restore, gen_domain_name):
128
128
129
129
@pytest .mark .skip (reason = 'Fails on c-ares 1.28.1' )
130
130
async def test_drop (call , gate , check_restore , gen_domain_name ):
131
- gate .to_client_drop ()
131
+ await gate .to_client_drop ()
132
132
133
133
response = await call (check_query = CheckQuery .FROM_MOCK )
134
134
@@ -137,7 +137,7 @@ async def test_drop(call, gate, check_restore, gen_domain_name):
137
137
138
138
139
139
async def test_delay (call , gate , check_restore ):
140
- gate .to_client_delay (delay = 10 )
140
+ await gate .to_client_delay (delay = 10 )
141
141
142
142
response = await call (timeout = 1 )
143
143
@@ -147,7 +147,7 @@ async def test_delay(call, gate, check_restore):
147
147
148
148
@pytest .mark .skip (reason = 'Fails on c-ares 1.28.1' )
149
149
async def test_close_on_data (call , gate , check_restore ):
150
- gate .to_client_close_on_data ()
150
+ await gate .to_client_close_on_data ()
151
151
152
152
response = await call ()
153
153
@@ -160,7 +160,7 @@ async def test_close_on_data(call, gate, check_restore):
160
160
161
161
@pytest .mark .skip (reason = 'Fails on c-ares 1.28.1' )
162
162
async def test_limit_bytes (call , gate , check_restore ):
163
- gate .to_client_limit_bytes (10 )
163
+ await gate .to_client_limit_bytes (10 )
164
164
# 10 bytes less than dns-mock message, so part of this message will be
165
165
# dropped and it must lead error
166
166
0 commit comments