-
Notifications
You must be signed in to change notification settings - Fork 1
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
Fallback key test #67
base: main
Are you sure you want to change the base?
Conversation
Adapter changes are at matrix-org/trafficlight-adapter-element-web#17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks OK overall; some API format concerns and a question about error handling.
trafficlight/internals/client.py
Outdated
@@ -255,3 +256,6 @@ async def advance_clock(self, duration: int) -> None: | |||
await self._perform_action( | |||
{"action": "advance_clock", "data": {"milliseconds": duration}} | |||
) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't see where go_offline is being used - do we need this still - is the test OK with using the network_proxy to make the client be offline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(this selected the wrong bit of code; the code in question is just below this line; sorry)
trafficlight/internals/client.py
Outdated
{"action": "create_room", "data": {"name": room_name}} | ||
) | ||
return cast(str, response["response"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a comment on the related PR in the adapter; i think we should have a little structure here to allow us to extend later (rather than only returning a string). If we change it in the adapter we'll need to change it here.
task = asyncio.create_task(client.sync_forever(timeout=30000)) | ||
await task | ||
except Exception as e: | ||
logging.exception(str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What exception are we catching, logging and dropping here?
If we do it like this, the exception handling of the test suite as a whole won't mark the test as failed - are we using this to hide an exception that isn't fatal to the test?
A short note on what we're catching/why would be good if we do need to hide exceptions that aren't failures.
For https://github.com/vector-im/hydrogen-internal/issues/22