Skip to content

Commit 4f9304c

Browse files
committed
DATAREDIS-549 - Polishing.
Redis consistently listens on all addresses. Improve sleep strategy.
1 parent 485ee1d commit 4f9304c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ work/redis-%.conf:
2727
echo port $* >> $@
2828
echo daemonize yes >> $@
2929
echo protected-mode no >> $@
30+
echo bind 0.0.0.0 >> $@
3031
echo notify-keyspace-events Ex >> $@
3132
echo pidfile $(shell pwd)/work/redis-$*.pid >> $@
3233
echo logfile $(shell pwd)/work/redis-$*.log >> $@
@@ -42,6 +43,7 @@ work/redis-6379.conf:
4243
echo port 6379 >> $@
4344
echo daemonize yes >> $@
4445
echo protected-mode no >> $@
46+
echo bind 0.0.0.0 >> $@
4547
echo notify-keyspace-events Ex >> $@
4648
echo pidfile $(shell pwd)/work/redis-6379.pid >> $@
4749
echo logfile $(shell pwd)/work/redis-6379.log >> $@
@@ -91,6 +93,7 @@ work/cluster-%.conf:
9193

9294
echo port $* >> $@
9395
echo protected-mode no >> $@
96+
echo bind 0.0.0.0 >> $@
9497
echo cluster-enabled yes >> $@
9598
echo cluster-config-file $(shell pwd)/work/nodes-$*.conf >> $@
9699
echo cluster-node-timeout 5 >> $@
@@ -102,6 +105,7 @@ work/cluster-%.pid: work/cluster-%.conf work/redis/bin/redis-server
102105
work/redis/bin/redis-server $< &
103106

104107
cluster-start: work/cluster-7379.pid work/cluster-7380.pid work/cluster-7381.pid work/cluster-7382.pid
108+
sleep 1
105109

106110
work/meet-%:
107111
-work/redis/bin/redis-cli -p $* cluster meet 127.0.0.1 7379
@@ -113,6 +117,7 @@ work/meet-7382:
113117
-work/redis/bin/redis-cli -p 7382 cluster replicate $(shell work/redis/bin/redis-cli -p 7379 cluster myid)
114118

115119
cluster-meet: work/meet-7380 work/meet-7381 work/meet-7382
120+
sleep 1
116121

117122
cluster-stop: stop-7379 stop-7380 stop-7381 stop-7382
118123

@@ -149,7 +154,7 @@ stop: redis-stop sentinel-stop cluster-stop
149154

150155
test:
151156
$(MAKE) start
152-
sleep 2
157+
sleep 1
153158
./mvnw clean test -U -DrunLongTests=true -P$(SPRING_PROFILE) || (echo "maven failed $$?"; exit 1)
154159
$(MAKE) stop
155160

0 commit comments

Comments
 (0)