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

Fallback key test #67

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Fallback key test #67

wants to merge 15 commits into from

Conversation

bwindels
Copy link
Contributor

@bwindels bwindels commented Nov 24, 2022

@MidhunSureshR MidhunSureshR marked this pull request as ready for review December 15, 2022 08:07
@MidhunSureshR
Copy link
Contributor

Adapter changes are at matrix-org/trafficlight-adapter-element-web#17

Copy link
Contributor

@michaelkaye michaelkaye left a 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.

@@ -255,3 +256,6 @@ async def advance_clock(self, duration: int) -> None:
await self._perform_action(
{"action": "advance_clock", "data": {"milliseconds": duration}}
)

Copy link
Contributor

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?

Copy link
Contributor

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)

{"action": "create_room", "data": {"name": room_name}}
)
return cast(str, response["response"])
Copy link
Contributor

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))
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants