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

Make spec reporting consistent with matrix-appservice-bridge #1680

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

progval
Copy link
Contributor

@progval progval commented Mar 11, 2023

The ad-hoc logging printed every test's name, even when skipped by --filter, causing the output to be longer than it should

The ad-hoc logging printed every test's name, even when skipped by --filter,
causing the output to be longer than it should
@progval progval requested a review from a team as a code owner March 11, 2023 14:35
@progval
Copy link
Contributor Author

progval commented Mar 11, 2023

Signed-off-by: Valentin Lorentz <progval plus matrixsignoff at progval dot net>

@progval
Copy link
Contributor Author

progval commented Mar 11, 2023

Any idea what is causing this?

TEST: Test listening for irc.example_M-flibble to call function 'connect'
TEST: Test listening for irc.example_bob to call function 'connect'
TEST: Test listening for irc.example_ro_bot_nick to call function 'connect'
TEST: Test listening for irc.example_M-flibble to call function 'join'
TEST: Test listening for irc.example_bob to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'join'
TEST: Test listening for irc.example_M-flibble to call function 'join'
TEST: Test listening for irc.example_ro_bot_nick to call function 'names'
TEST: Test listening for irc.example_ro_bot_nick to call function 'part'
DEBUG 20:40:44:295 [LogWrapper] Reconfigured logging
2023-03-11 20:40:44 INFO:IrcBridge Sending ephemeral events to the bridge is currently disabled in the registration file, so user activity will not be captured
2023-03-11 20:40:44 ERROR:BridgedClient <[email protected]#9p3gflka8qo00> sendMessage: Failed to join channel oprah
2023-03-11 20:40:44 INFO:IrcBridge Using NeDBDataStore for Datastore
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'matrix_id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'remote_id' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'localpart' for store.
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked on 'user id' for store.
2023-03-11 20:40:44 INFO:CryptoStore Private key loaded from ./spec/support/passkey.pem - IRC password encryption enabled.
2023-03-11 20:40:44 INFO:IrcBridge Restoring last active times from DB
2023-03-11 20:40:44 INFO:IrcBridge Restored 0 last active times from DB
2023-03-11 20:40:44 INFO:IrcServer Reconfiguring irc.example
2023-03-11 20:40:44 INFO:NeDBDataStore storeRoom (id=!foo:bar, addr=irc.example, chan=#coffee, origin=config)
2023-03-11 20:40:44 INFO:NeDBDataStore Indexes checked for ident username for irc.example on users database
2023-03-11 20:40:44 INFO:IrcBridge Listening on 0.0.0.0:2
2023-03-11 20:40:44 INFO:IrcBridge Fetching Matrix rooms that are already joined to...
2023-03-11 20:40:44 INFO:IrcBridge ASBot is in 0 rooms!
2023-03-11 20:40:44 INFO:IrcBridge Joining mapped Matrix rooms...
2023-03-11 20:40:44 INFO:IrcBridge Syncing relevant membership lists...
2023-03-11 20:40:44 INFO:MemberListSyncer irc.example does not have membership list syncing enabled.
2023-03-11 20:40:44 INFO:IrcBridge Starting provisioning API...
2023-03-11 20:40:44 WARN:Provisioner Provisioner is incompatible with NeDB store. Widget requests will not be handled.
2023-03-11 20:40:44 INFO:Provisioner Provisioning API ready
2023-03-11 20:40:44 INFO:IrcBridge Connecting to IRC networks...
2023-03-11 20:40:44 INFO:BridgedClient <[email protected]#av6nhay72m800> Created client for bot
2023-03-11 20:40:44 DEBUG:ClientPool 1 active connections on irc.example
2023-03-11 20:40:44 DEBUG:ClientPool Created new bot client for irc.example : av6nhay72m800 (bot enabled=true)
2023-03-11 20:40:44 INFO:ClientPool Bot connecting to irc.example (1 channels) => ["#coffee"]
2023-03-11 20:40:44 DEBUG:BridgedClient <[email protected]#av6nhay72m800> Client is now CONNECTING
2023-03-11 20:40:44 INFO:BridgedClient <[email protected]#av6nhay72m800> Connecting to IRC server irc.example as ro_bot_nick (user=matrixbot)
TEST: Bridge called IRC client.connect(["irc.example_ro_bot_nick","connect",{"a)
TEST: Invoking test callback for user irc.example_ro_bot_nick : client.connect([{"addr":"irc.example","nick":"ro_bot_ni)
2023-03-11 20:40:44 INFO:BridgedClient <[email protected]#av6nhay72m800> Client is now CONNECTED
2023-03-11 20:40:44 INFO:IrcBridge Startup complete.
2023-03-11 20:40:44 INFO:main Killing bridge: test teardown
2023-03-11 20:40:44 INFO:IrcBridge Killing bridge
2023-03-11 20:40:44 INFO:IrcBridge Killing all clients
2023-03-11 20:40:44 INFO:BridgedClient Killing client 
2023-03-11 20:40:44 DEBUG:BridgedClient Client is now KILLED
2023-03-11 20:40:44 INFO:client-connection disconnect()ing [email protected] - killed
TEST: Bridge called IRC client.disconnect(["irc.example_ro_bot_nick","disconnect",)
2023-03-11 20:40:44 WARN:ClientPool Client av6nhay72m800 (null) disconnected with reason killed
2023-03-11 20:40:44 INFO:ClientPool Dropping av6nhay72m800 (ro_bot_nick) because explicitDisconnect is true
2023-03-11 20:40:44 INFO:BridgedClient Killing client 
2023-03-11 20:40:44 DEBUG:BridgedClient Client is now KILLED
2023-03-11 20:40:44 INFO:IrcBridge Closing bridge
        ✗ should create a M<--->I link for a channel that has capital letters in it
          - Unhandled promise rejection: Error: No client

it seems sensitive to test order, but I can't figure what is causing it

@@ -87,7 +87,8 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"homerunner-client": "^0.0.6",
"jasmine": "^3.99.0",
"jasmine": "^4.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

At some point I want to toss out jasmine and replace with jest to broadly be aligned with the rest of matrix-org, but for now any improvements are good.

@@ -20,14 +20,6 @@ const main = proxyquire("../../lib/main.js", {
"matrix-org-irc": ircMock,
});

// Log the test case. Jasmine is a global var.
jasmine.getEnv().addReporter({
Copy link
Contributor

Choose a reason for hiding this comment

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

god, what a wart.

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.

2 participants