Project

General

Profile

MessageSendFullJidOK message treated as reply

Tomasz Sterna
Added almost 3 years ago

I am running testsuite against my server. So far, so good - it already revealed one nasty bug. :)

But I have issues with basic-tests test 7:

$ scripts/all-tests-runner.sh --func
Can't find settings file: scripts/tests-runner-settings.sh using defaults
Tigase server home directory: ../jabberd2
Version: 2.x.dev
Output dir: files/static/tests/2.x.dev
Test type:        func
Database:         sqlite
Server directory: ../jabberd2
Server IP:        127.0.0.1
Extra parameters: 
Re-creating database: sqlite
wal
Script name: scripts/add-admin.xmpt
Init 0:  JEP-0077 - In-Band Registration, register  ... success,  Total: 128ms

Running: 2.x.dev-sqlite test, IP 127.0.0.1...
Script name: scripts/all-xmpp-tests.xmpt
Prep 1:  XEP-0077 - In-Band Registration, register  ... success,  Total: 371ms
Prep 2:  Create a daemon user account  ... success,  Total: 283ms
Prep 3:  Setup a user daemon wating for messages  ... success,  Total: 501ms
Loading tests from external file: scripts/xmpts/basic-tests.xmpt
Basic 1 (c2s):  Stream open to server.  ... success,  Total: 253ms
Basic 2 (c2s):  XEP-0077 - In-Band Registration, register  ... success,  Total: 269ms
Basic 3 (c2s):  XEP-0077 - In-Band Registration - user unregister  ... success,  Total: 311ms
Basic 4 (c2s):  XEP-0078 Non-SASL authorization with plain password.  ... success,  Total: 260ms
Basic 5 (c2s):  XEP-0078 Non-SASL authorization with digest password.  ... success,  Total: 274ms
Basic 6 (c2s):  Send a message to self user and don't wait for response  ... success,  Total: 562ms
Basic 7 (c2s):  Message send to correct/available full JID: all-xmpp-test_1@test-d/def-user-resource, expecting response  ...        failure!
Error code: PROCESSING_EXCEPTION, error message: tigase.test.impl.TestCommon, Read timed out
1: Expected: [<message type="chat" from="all-xmpp-test_1@test-d/def-user-resource" to="all-xmpp-test@test-d/def-user-resource">
<body>Message OK</body>
</message>]
FAILURE,  (Too many errors, stopping test: 0 OK, 1 ER),  Total: 15080ms

After turning -debug on, it looks like MessageSendFullJidOK sent message routed via the server is not getting sent a "Message OK" reply, instead itself is being treated as a reply:

Sending: <message id="1" type="chat" to="all-xmpp-test_1@test-d/def-user-resource">
<body>Test message no. 1, from: all-xmpp-test@test-d/def-user-resource.</body>
</message>Received: <message id="1" type="chat" from="all-xmpp-test@test-d/def-user-resource" to="all-xmpp-test_1@test-d/def-user-resource" xmlns="jabber:client">
<body>Test message no. 1, from: all-xmpp-test@test-d/def-user-resource.</body></message>
checking reply: <message id="1" type="chat" from="all-xmpp-test@test-d/def-user-resource" to="all-xmpp-test_1@test-d/def-user-resource" xmlns="jabber:client">
<body>Test message no. 1, from: all-xmpp-test@test-d/def-user-resource.</body></message> with expected: presence
       failure!
Error code: RESULT_DOESNT_MATCH, error message: tigase.test.impl.TestPresence, all-xmpp-test_1@test-d/def-user-resource(all-xmpp-test-password), Received result doesn't match expected result., tigase.test.impl.TestPresence, expected: 'presence', Received: '<message id="1" type="chat" from="all-xmpp-test@test-d/def-user-resource" to="all-xmpp-test_1@test-d/def-user-resource" xmlns="jabber:client">

Replies (1)

Added by Wojciech Kapcia TigaseTeam over 2 years ago

Tomasz Sterna wrote:

I am running testsuite against my server. So far, so good - it already revealed one nasty bug. :)

But I have issues with basic-tests test 7:

[...]

After turning -debug on, it looks like MessageSendFullJidOK sent message routed via the server is not getting sent a "Message OK" reply, instead itself is being treated as a reply:

[...]

It looks like there is a <presence/> packet interfering. Can you check that all the packets came in correct order?

The last bit is on of the tipping points which made us move away from TTS - being very strict about stanzas order.

    (1-1/1)