fix(tests): add delay for presence processing in chat session test for tests with Valgrind
All checks were successful
CI Code / Check spelling (pull_request) Successful in 21s
CI Code / Check coding style (pull_request) Successful in 35s
CI Code / Linux (ubuntu) (pull_request) Successful in 1h6m7s
CI Code / Linux (debian) (pull_request) Successful in 1h8m30s
CI Code / Linux (arch) (pull_request) Successful in 1h8m35s

This commit is contained in:
2026-01-06 01:24:47 +03:00
parent 8e8d715734
commit 0a37dd3fe8

View File

@@ -144,12 +144,11 @@ resets_to_barejid_after_presence_received(void **state)
"<show>dnd</show>"
"</presence>"
);
// TODO: This assertion is currently disabled because the presence update
// may not reliably appear in the console output when a chat session is active.
// The test verifies that the message is sent to barejid (not fulljid) after
// receiving presence from a different resource, which is the main goal.
// See: PR #63 review discussion
// assert_true(prof_output_regex("Buddy1.*dnd"));
// Wait for presence to be processed before sending next message.
// The presence output may appear in console or chat window depending on focus,
// so we use a small delay to ensure the session is reset to barejid.
// Under Valgrind, processing is slower, so this delay is necessary.
g_usleep(500000); // 500ms
prof_input("/msg buddy1@localhost Outgoing 2");
assert_true(stbbr_received(