--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,12 @@
 
 check: hiredis-test
 	@echo "$$REDIS_TEST_CONFIG" | $(REDIS_SERVER) -
+	for i in 1 2 3 4 5; do \
+		if [ -r /tmp/hiredis-test-redis.sock ]; then \
+			break; \
+		fi; \
+		sleep 1; \
+	done
 	$(PRE) ./hiredis-test -h 127.0.0.1 -p $(REDIS_PORT) -s /tmp/hiredis-test-redis.sock || \
 			( kill `cat /tmp/hiredis-test-redis.pid` && false )
 	kill `cat /tmp/hiredis-test-redis.pid`

Description: Fix race creating unix socket in tests.
  There seems to be a race between the Redis server strarting up and
  the unix socket test. This gives redis a little more time to create
  the socket file.
Author: Tom Lee <debian@tomlee.co>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/Makefile
+++ b/Makefile
@@ -132,6 +132,12 @@
 
 check: hiredis-test
 	@echo "$$REDIS_TEST_CONFIG" | $(REDIS_SERVER) -
+	for i in 1 2 3 4 5; do \
+		if [ -r /tmp/hiredis-test-redis.sock ]; then \
+			break; \
+		fi; \
+		sleep 1; \
+	done
 	$(PRE) ./hiredis-test -h 127.0.0.1 -p $(REDIS_PORT) -s /tmp/hiredis-test-redis.sock || \
 			( kill `cat /tmp/hiredis-test-redis.pid` && false )
 	kill `cat /tmp/hiredis-test-redis.pid`

Work around a race in 'make check'
Work around a race in 'make check'
