mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 11:06:21 +00:00
fix(tests): add delay for presence processing in chat session test for tests with Valgrind
This commit is contained in:
@@ -144,12 +144,11 @@ resets_to_barejid_after_presence_received(void **state)
|
|||||||
"<show>dnd</show>"
|
"<show>dnd</show>"
|
||||||
"</presence>"
|
"</presence>"
|
||||||
);
|
);
|
||||||
// TODO: This assertion is currently disabled because the presence update
|
// Wait for presence to be processed before sending next message.
|
||||||
// may not reliably appear in the console output when a chat session is active.
|
// The presence output may appear in console or chat window depending on focus,
|
||||||
// The test verifies that the message is sent to barejid (not fulljid) after
|
// so we use a small delay to ensure the session is reset to barejid.
|
||||||
// receiving presence from a different resource, which is the main goal.
|
// Under Valgrind, processing is slower, so this delay is necessary.
|
||||||
// See: PR #63 review discussion
|
g_usleep(500000); // 500ms
|
||||||
// assert_true(prof_output_regex("Buddy1.*dnd"));
|
|
||||||
|
|
||||||
prof_input("/msg buddy1@localhost Outgoing 2");
|
prof_input("/msg buddy1@localhost Outgoing 2");
|
||||||
assert_true(stbbr_received(
|
assert_true(stbbr_received(
|
||||||
|
|||||||
Reference in New Issue
Block a user