Skip to content

Commit 3bc4f01

Browse files
committed
Rename:
connection_rate -> tcp_connection_rate connection_burst -> tcp_connection_burst concurrent_connections -> concurrent_tcp_connections
1 parent 27efa75 commit 3bc4f01

File tree

8 files changed

+23
-30
lines changed

8 files changed

+23
-30
lines changed

framework/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def cleanup(self):
8383
self.node.remove_file(f)
8484

8585
def copy_files(self):
86-
for (name, content) in self.files:
86+
for name, content in self.files:
8787
self.node.copy_file(name, content)
8888

8989
def is_busy(self, verbose=True):

reconf/test_stress_grace.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313

1414
class SchedStickyGraceRatioSched(reconf_stress.LiveReconfStress):
15-
1615
sg_name = "default"
1716
sched = "ratio static"
1817
defconfig = (
@@ -50,7 +49,6 @@ def test_ratio_del_srvs(self):
5049

5150

5251
class SchedStickyGraceHashSched(SchedStickyGraceRatioSched):
53-
5452
sched = "hash"
5553

5654

reconf/test_stress_sticky.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313

1414
class SchedSticky(reconf_stress.LiveReconfStress):
15-
1615
sg_name = "default"
1716
sched = "ratio static"
1817
defconfig = (

sessions/test_sticky_sess_stress.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
class OneClient(stress.StressTest):
18-
1918
config = (
2019
"cache 0;\n"
2120
"sticky {\n"
@@ -75,7 +74,6 @@ def test(self):
7574

7675

7776
class LotOfClients(OneClient):
78-
7977
# Override maximum number of clients
8078
clients_num = min(int(tf_cfg.cfg.get("General", "concurrent_connections")), 1000)
8179

t_frang/test_concurrent_connections.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Functional tests for `concurrent_connections` in Tempesta config."""
1+
"""Functional tests for `concurrent_tcp_connections` in Tempesta config."""
22

33
__author__ = "Tempesta Technologies, Inc."
44
__copyright__ = "Copyright (C) 2019-2023 Tempesta Technologies, Inc."
@@ -107,10 +107,10 @@ def _base_scenario(self, clients: list, responses: int):
107107

108108
def test_three_clients_same_ip(self):
109109
"""
110-
For three clients with same IP and concurrent_connections 2, ip_block off:
110+
For three clients with same IP and concurrent_tcp_connections 2, ip_block off:
111111
- Tempesta serves only two clients.
112112
"""
113-
self.set_frang_config(frang_config="concurrent_connections 2;\n\tip_block off;")
113+
self.set_frang_config(frang_config="concurrent_tcp_connections 2;\n\tip_block off;")
114114

115115
self._base_scenario(
116116
clients=[
@@ -125,10 +125,10 @@ def test_three_clients_same_ip(self):
125125

126126
def test_three_clients_different_ip(self):
127127
"""
128-
For three clients with different IP and concurrent_connections 2:
128+
For three clients with different IP and concurrent_tcp_connections 2:
129129
- Tempesta serves three clients.
130130
"""
131-
self.set_frang_config(frang_config="concurrent_connections 2;\n\tip_block off;")
131+
self.set_frang_config(frang_config="concurrent_tcp_connections 2;\n\tip_block off;")
132132
self._base_scenario(
133133
clients=[
134134
self.get_client("deproxy-interface-1"),
@@ -142,10 +142,10 @@ def test_three_clients_different_ip(self):
142142

143143
def test_three_clients_same_ip_with_block_ip(self):
144144
"""
145-
For three clients with same IP and concurrent_connections 2, ip_block on:
145+
For three clients with same IP and concurrent_tcp_connections 2, ip_block on:
146146
- Tempesta does not serve clients.
147147
"""
148-
self.set_frang_config(frang_config="concurrent_connections 2;\n\tip_block on;")
148+
self.set_frang_config(frang_config="concurrent_tcp_connections 2;\n\tip_block on;")
149149
self._base_scenario(
150150
clients=[
151151
self.get_client("deproxy-1"),
@@ -163,7 +163,7 @@ def test_clear_client_connection_stats(self):
163163
Check that Tempesta cleared client connection stats and
164164
new connections are established.
165165
"""
166-
self.set_frang_config(frang_config="concurrent_connections 2;\n\tip_block on;")
166+
self.set_frang_config(frang_config="concurrent_tcp_connections 2;\n\tip_block on;")
167167

168168
client = self.get_client("parallel-curl")
169169

t_frang/test_connection_rate_burst.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Tests for Frang directive `connection_rate` and 'connection_burst'."""
1+
"""Tests for Frang directive `*_connection_rate` and '*_connection_burst'."""
22
import time
33

44
from helpers import util
@@ -147,7 +147,7 @@ def test_connection_rate_on_the_limit(self):
147147

148148

149149
class FrangTcp(FrangTls):
150-
"""Tests for 'connection_burst' and 'connection_rate'."""
150+
"""Tests for 'tcp_connection_burst' and 'tcp_connection_rate'."""
151151

152152
clients = [
153153
{
@@ -178,8 +178,8 @@ class FrangTcp(FrangTls):
178178

179179
burst_warning = ERROR.format("burst")
180180
rate_warning = ERROR.format("rate")
181-
burst_config = "connection_burst 5;\n\tconnection_rate 20;"
182-
rate_config = "connection_burst 2;\n\tconnection_rate 4;"
181+
burst_config = "tcp_connection_burst 5;\n\ttcp_connection_rate 20;"
182+
rate_config = "tcp_connection_burst 2;\n\ttcp_connection_rate 4;"
183183

184184

185185
class FrangConnectionRateDifferentIp(FrangTestCase):
@@ -207,7 +207,7 @@ class FrangConnectionRateDifferentIp(FrangTestCase):
207207
tempesta = {
208208
"config": """
209209
frang_limits {
210-
connection_rate 2;
210+
tcp_connection_rate 2;
211211
ip_block on;
212212
}
213213
listen 80;
@@ -250,7 +250,7 @@ class FrangConnectionBurstDifferentIp(FrangConnectionRateDifferentIp):
250250
tempesta = {
251251
"config": """
252252
frang_limits {
253-
connection_burst 2;
253+
tcp_connection_burst 2;
254254
ip_block on;
255255
}
256256
listen 80;
@@ -451,7 +451,7 @@ def test_rate(self):
451451

452452

453453
class FrangTcpVsBoth(FrangTlsVsBoth):
454-
"""Tests for tls and non-tls connections 'connection_burst' and 'connection_rate'"""
454+
"""Tests for tls and non-tls connections 'tcp_connection_burst' and 'tcp_connection_rate'"""
455455

456456
tempesta_template = {
457457
"config": """
@@ -478,12 +478,12 @@ class FrangTcpVsBoth(FrangTlsVsBoth):
478478
optional_client_id = "curl-https"
479479
burst_warning = ERROR.format("burst")
480480
rate_warning = ERROR.format("rate")
481-
burst_config = "connection_burst 3;"
482-
rate_config = "connection_rate 3;"
481+
burst_config = "tcp_connection_burst 3;"
482+
rate_config = "tcp_connection_rate 3;"
483483

484484
def test_burst(self):
485485
"""
486-
Set `connection_burst 3` and create 4 tls and 4 non-tls connections.
486+
Set `tcp_connection_burst 3` and create 4 tls and 4 non-tls connections.
487487
Connections of both types will be blocked (4+4 > 3*2).
488488
"""
489489
self.set_frang_config(frang_config=self.burst_config)
@@ -498,7 +498,7 @@ def test_burst(self):
498498

499499
def test_rate(self):
500500
"""
501-
Set connection_rate 3` and create 2 tls and 2 non-tls connections.
501+
Set tcp_connection_rate 3` and create 2 tls and 2 non-tls connections.
502502
Connections of both types will be blocked (2+2 > 3).
503503
"""
504504
self.set_frang_config(frang_config=self.rate_config + self.no_shc_config)

t_frang/test_ip_block.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def test_two_client_one_ip_with_ip_block_off(self):
142142

143143
class FrangIpBlockConnectionLimits(FrangIpBlockBase):
144144
"""
145-
For `connection_rate 1` and `block_action attack reply`.
145+
For `tcp_connection_rate 1` and `block_action attack reply`.
146146
Create two client connections, send valid requests and receive:
147147
- for different ip and ip_block on or off - 200 and 200 response;
148148
- for single ip and ip_block on - RST and RST;
@@ -153,7 +153,7 @@ class FrangIpBlockConnectionLimits(FrangIpBlockBase):
153153
"config": """
154154
frang_limits {
155155
http_strict_host_checking false;
156-
connection_rate 1;
156+
tcp_connection_rate 1;
157157
ip_block on;
158158
}
159159
listen 80;
@@ -202,7 +202,7 @@ def test_two_clients_one_ip_with_ip_block_off(self):
202202
"config": """
203203
frang_limits {
204204
http_strict_host_checking false;
205-
connection_rate 1;
205+
tcp_connection_rate 1;
206206
ip_block off;
207207
}
208208
listen 80;

t_stress/test_wordpress.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from framework import tester
99
from helpers import remote, sysnet, tf_cfg
10-
1110
from t_stress.test_stress import CustomMtuMixin
1211

1312
__author__ = "Tempesta Technologies, Inc."
@@ -22,7 +21,6 @@
2221

2322

2423
class BaseWorpressStress(CustomMtuMixin, tester.TempestaTest, base=True):
25-
2624
tempesta_tmpl = """
2725
listen 443 proto=%s;
2826
server ${server_ip}:8000;

0 commit comments

Comments
 (0)