10 Commits
Author SHA1 Message Date
Julius Pfrommer 335cead676 test(mt): synchronize remaining threaded fixture state
Use pointer-sized atomic run flags in threaded fixtures, including dynamically
allocated discovery and browse flags. Pointer sizing supports the MSVC atomic
implementation as well as C11 and GCC atomics.

Serialize the client error-injection test with the server network callbacks
before accessing the internal session and shared send buffer.
2026-09-21 16:23:09 +02:00
Andreas Ebner 96ea2b301f fix(tests): handle concurrent delete race in check_mt_addDeleteObject
The server_deleteObject() function needs to handle concurrent scenarios where
client threads try to delete nodes while worker threads are creating them.

The original code used an infinite loop waiting for UA_STATUSCODE_GOOD, which
hung when nodes returned BADNODEIDUNKNOWN (deleted during construction or not yet created).

Changed to retry up to 100 times with 10ms sleep between attempts when getting
BADNODEIDUNKNOWN. This provides proper synchronization (max 1 second wait) for racing
add operations to complete, especially important under valgrind where operations are slower.

The loop exits immediately on UA_STATUSCODE_GOOD (successful delete). After retries,
accepts both GOOD and BADNODEIDUNKNOWN (node deleted during construction or add failed)
as valid outcomes.
2026-02-13 07:23:53 +01:00
Julius Pfrommer dd300f3eff refactor(tests): Set a custom "fake" clock in the EventLoop for unit tests 2023-10-04 10:56:26 +02:00
Julius Pfrommer 390c092c05 refactor(tests): Include stdlib.h where open62541 no longer does it 2023-07-28 21:42:56 +02:00
Julius Pfrommer 928931ec36 refactor(core): Move architecture-specific definition out of the public headers 2023-07-28 21:42:56 +02:00
Andreas Eckerstorfer 022ad60723 fix (tests): Check server instance in UNIT tests
Failed UNIT tests caused an exception in the server loop, if the
server instance could not be created.
2023-01-31 00:07:18 +01:00
Julius Pfrommer d4b4116907 refactor(test): Simplify the multithreaded unit test logic 2022-08-05 09:13:05 +02:00
Julius Pfrommer f748151b06 refactor(tests): Use only standard printf integer types 2022-03-27 10:56:27 +02:00
Ubuntu cbf26d66ed fix(multithreading): Fix tests for windows 2019-09-10 07:41:05 +02:00
Ubuntu be4330cc40 test(server): Add multithreading tests 2019-08-19 23:36:03 +02:00