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>" "<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(