Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky compliance checks #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions interop.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,12 @@ def _check_impl_is_compliant(self, name: str) -> bool:
"DOWNLOADS=" + downloads_dir.name + " "
'SCENARIO="simple-p2p --delay=15ms --bandwidth=10Mbps --queue=25" '
"CLIENT=" + self._implementations[name]["image"] + " "
"docker-compose up --timeout 0 --abort-on-container-exit -V sim client"
"docker-compose up --timeout 0 --exit-code-from client -V sim client"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We’re starting multiple containers, and we can’t know which one exits first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does sim container exit before client container? I think a compliant client exits first with exit code 127, then docker-compose kills sim.

)
output = subprocess.run(
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
if not self._is_unsupported(output.stdout.splitlines()):
if output.returncode != 127:
logging.error("%s client not compliant.", name)
logging.debug("%s", output.stdout.decode("utf-8"))
self.compliant[name] = False
Expand All @@ -153,12 +153,12 @@ def _check_impl_is_compliant(self, name: str) -> bool:
"WWW=" + www_dir.name + " "
"DOWNLOADS=" + downloads_dir.name + " "
"SERVER=" + self._implementations[name]["image"] + " "
"docker-compose up -V server"
"docker-compose up --exit-code-from server -V server"
)
output = subprocess.run(
cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT
)
if not self._is_unsupported(output.stdout.splitlines()):
if output.returncode != 127:
logging.error("%s server not compliant.", name)
logging.debug("%s", output.stdout.decode("utf-8"))
self.compliant[name] = False
Expand Down