diff options
author | Mark Roberts <wizzat@gmail.com> | 2014-04-23 02:04:04 -0700 |
---|---|---|
committer | Mark Roberts <wizzat@gmail.com> | 2014-04-23 02:04:04 -0700 |
commit | 7e5c847aa91de8786c08e8424519ddd22d5c67e8 (patch) | |
tree | ea1edb1092284e4d82c6c0c5d0b2728b509f2f1a /test | |
parent | 6628c109b786cfc3c429400eaa258298bcc77ec0 (diff) | |
download | kafka-python-7e5c847aa91de8786c08e8424519ddd22d5c67e8.tar.gz |
Add support for kafka 0.8.1
Diffstat (limited to 'test')
-rw-r--r-- | test/fixtures.py | 6 | ||||
-rw-r--r-- | test/service.py | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/test/fixtures.py b/test/fixtures.py index af4c145..7b032f1 100644 --- a/test/fixtures.py +++ b/test/fixtures.py @@ -26,9 +26,13 @@ class Fixture(object): # ./kafka-src/bin/kafka-run-class.sh is the authority. jars = ["."] - # assume all dependencies have been packaged into one jar with sbt-assembly's task "assembly-package-dependency" + # 0.8.0 build path, should contain the core jar and a deps jar jars.extend(glob.glob(cls.kafka_root + "/core/target/scala-%s/*.jar" % cls.scala_version)) + # 0.8.1 build path, should contain the core jar and several dep jars + jars.extend(glob.glob(cls.kafka_root + "/core/build/libs/*.jar")) + jars.extend(glob.glob(cls.kafka_root + "/core/build/dependant-libs-%s/*.jar" % cls.scala_version)) + jars = filter(os.path.exists, map(os.path.abspath, jars)) return ":".join(jars) diff --git a/test/service.py b/test/service.py index 5e6ce61..1b95cbc 100644 --- a/test/service.py +++ b/test/service.py @@ -45,7 +45,7 @@ class SpawnedService(threading.Thread): self.capture_stdout = capture self.show_stdout = show - def configure_stderr(self, file=None, capture=False, show=True): + def configure_stderr(self, file=None, capture=False, show=False): self.stderr_file = file self.capture_stderr = capture self.show_stderr = show @@ -114,9 +114,10 @@ class SpawnedService(threading.Thread): t2 = time.time() if t2 - t1 >= timeout: raise RuntimeError("Waiting for %r timed out" % pattern) - if re.search(pattern, self.captured_stdout) is not None: + + if re.search(pattern, self.captured_stdout, re.IGNORECASE) is not None: return - if re.search(pattern, self.captured_stderr) is not None: + if re.search(pattern, self.captured_stderr, re.IGNORECASE) is not None: return time.sleep(0.1) |