Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F7343142
D5748.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D5748.diff
View Options
diff --git a/swh/storage/tests/test_cassandra.py b/swh/storage/tests/test_cassandra.py
--- a/swh/storage/tests/test_cassandra.py
+++ b/swh/storage/tests/test_cassandra.py
@@ -127,19 +127,22 @@
stderr=stderr,
)
- running = wait_for_peer("127.0.0.1", native_transport_port)
+ listening = wait_for_peer("127.0.0.1", native_transport_port)
- if running:
+ if listening:
yield (["127.0.0.1"], native_transport_port)
- if not running or os.environ.get("SWH_CASSANDRA_LOG"):
+ if not listening or os.environ.get("SWH_CASSANDRA_LOG"):
debug_log_path = str(cassandra_log.join("debug.log"))
if os.path.exists(debug_log_path):
with open(debug_log_path) as fd:
print(fd.read())
- if not running:
- raise Exception("cassandra process stopped unexpectedly.")
+ if not listening:
+ if proc.poll() is None:
+ raise Exception("cassandra process unexpectedly not listening.")
+ else:
+ raise Exception("cassandra process unexpectedly stopped.")
pgrp = os.getpgid(proc.pid)
os.killpg(pgrp, signal.SIGKILL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mar 17 2025, 7:38 PM (7 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3218674
Attached To
D5748: test_cassandra: Improve error when the process is started but not listening
Event Timeline
Log In to Comment