Skip to content

Commit a86b874

Browse files
authored
test: fix envoy settings for bench (#121)
1 parent b7949cc commit a86b874

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

compose.latency.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ services:
3737
bash -c "apt-get update > /dev/null
3838
&& apt-get install --no-install-recommends --no-install-suggests -y iproute2 iputils-ping > /dev/null
3939
&& rm -rf /var/lib/apt/lists/*
40-
&& tc qdisc add dev eth0 root netem delay ${DELAY_TIME:-20ms}
40+
&& (tc qdisc add dev eth0 root netem delay ${DELAY_TIME:-20ms} || echo skipped)
4141
&& redis-server
4242
--maxmemory 64mb
4343
--maxmemory-policy allkeys-lru
@@ -101,9 +101,11 @@ services:
101101
condition: service_healthy
102102
node9:
103103
condition: service_healthy
104-
envoy:
104+
proxy:
105105
image: envoyproxy/envoy:v1.23.1
106+
restart: "${RESTART_POLICY:-always}"
106107
ports:
108+
- "3000:10000"
107109
- "7000:10001"
108110
volumes:
109111
- ./test/proxy/envoy.yaml:/etc/envoy/envoy.yaml

test/bench_command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def bench_pipeline_echo
9797
private
9898

9999
def new_test_client
100-
::RedisClient.config(**TEST_GENERIC_OPTIONS.merge(port: 7000, protocol: 2)).new_client
100+
::RedisClient.config(**TEST_GENERIC_OPTIONS.merge(BENCH_PROXY_OPTIONS)).new_client
101101
end
102102

103103
def new_cluster_client

test/proxy/envoy.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
admin:
66
address:
77
socket_address:
8-
protocol: TCP
98
address: 0.0.0.0
109
port_value: 10000
1110
static_resources:
@@ -49,3 +48,9 @@ static_resources:
4948
endpoints:
5049
- lb_endpoints:
5150
- endpoint: { address: { socket_address: { address: node1, port_value: 6379 } } }
51+
layered_runtime:
52+
layers:
53+
- name: redis
54+
static_layer:
55+
overload:
56+
global_downstream_max_connections: 100

test/testing_constants.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,6 @@
6363
TEST_REDIS_MAJOR_VERSION = Integer(TEST_REDIS_VERSION.split('.').first)
6464
_tmp_cli.close
6565

66+
BENCH_PROXY_OPTIONS = { port: 7000, protocol: 2 }.freeze
67+
6668
# rubocop:enable Lint/UnderscorePrefixedVariableName

0 commit comments

Comments
 (0)