You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by cr...@apache.org on 2015/03/02 00:54:43 UTC
samza git commit: SAMZA-583;
fix integration tests that broke after SAMZA-394
Repository: samza
Updated Branches:
refs/heads/master dd18d5ae4 -> c6fa8edc8
SAMZA-583; fix integration tests that broke after SAMZA-394
Project: http://git-wip-us.apache.org/repos/asf/samza/repo
Commit: http://git-wip-us.apache.org/repos/asf/samza/commit/c6fa8edc
Tree: http://git-wip-us.apache.org/repos/asf/samza/tree/c6fa8edc
Diff: http://git-wip-us.apache.org/repos/asf/samza/diff/c6fa8edc
Branch: refs/heads/master
Commit: c6fa8edc89779b3e28a264edb264c8f8e9ecd55a
Parents: dd18d5a
Author: Chris Riccomini <cr...@apache.org>
Authored: Sun Mar 1 15:54:36 2015 -0800
Committer: Chris Riccomini <cr...@apache.org>
Committed: Sun Mar 1 15:54:36 2015 -0800
----------------------------------------------------------------------
samza-test/src/main/config/negate-number.properties | 2 --
samza-test/src/main/python/tests/util.py | 13 +++++++++----
2 files changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/samza/blob/c6fa8edc/samza-test/src/main/config/negate-number.properties
----------------------------------------------------------------------
diff --git a/samza-test/src/main/config/negate-number.properties b/samza-test/src/main/config/negate-number.properties
index 2d2f75a..b9f898c 100644
--- a/samza-test/src/main/config/negate-number.properties
+++ b/samza-test/src/main/config/negate-number.properties
@@ -27,8 +27,6 @@ task.class=org.apache.samza.test.integration.NegateNumberTask
task.inputs=kafka.samza-test-topic
task.max.messages=50
task.outputs=kafka.samza-test-topic-output
-task.checkpoint.factory=org.apache.samza.checkpoint.kafka.KafkaCheckpointManagerFactory
-task.checkpoint.replication.factor=1
# Serializers
serializers.registry.string.class=org.apache.samza.serializers.StringSerdeFactory
http://git-wip-us.apache.org/repos/asf/samza/blob/c6fa8edc/samza-test/src/main/python/tests/util.py
----------------------------------------------------------------------
diff --git a/samza-test/src/main/python/tests/util.py b/samza-test/src/main/python/tests/util.py
index a0ed671..b0098a5 100644
--- a/samza-test/src/main/python/tests/util.py
+++ b/samza-test/src/main/python/tests/util.py
@@ -17,6 +17,7 @@
import logging
import socket
+import time
import errno
import zopkio.runtime as runtime
from kafka import KafkaClient, SimpleProducer, SimpleConsumer
@@ -65,20 +66,24 @@ def wait_for_server(host, port, timeout=5, retries=12):
"""
Keep trying to connect to a host port until the retry count has been reached.
"""
- s = socket.socket()
+ s = None
for i in range(retries):
try:
+ s = socket.socket()
s.settimeout(timeout)
s.connect((host, port))
except socket.timeout, err:
# Exception occurs if timeout is set. Wait and retry.
- pass
+ time.sleep(timeout)
except socket.error, err:
# Exception occurs if timeout > underlying network timeout. Wait and retry.
- if type(err.args) != tuple or err[0] != errno.ETIMEDOUT:
+ if type(err.args) != tuple or (err[0] != errno.ETIMEDOUT and err[0] != errno.ECONNREFUSED):
raise
+ else:
+ time.sleep(timeout)
else:
- s.close()
+ if s:
+ s.close()
return True
return False