Skip to content

Commit cfa5bcc

Browse files
committed
Updates OPC UA server tests to process valve evaluation
Adds a call to `valve::evaluate()` in the `methods_callbacks` test to handle valve shutdown delays. This ensures the device state is correctly updated before verifying the results of the `off` method.
1 parent e393c4f commit cfa5bcc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/OPCUAServer_tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ TEST( OPCUA_server, methods_callbacks )
230230
res = G_OPCUA_SERVER.method_off( nullptr, nullptr, nullptr,
231231
nullptr, dev, nullptr, nullptr, 0, nullptr, 0, nullptr );
232232
EXPECT_EQ( UA_STATUSCODE_GOOD, res );
233+
// Вызываем evaluate() для обработки задержки выключения клапана.
234+
sleep_ms( 1 );
235+
valve::evaluate();
233236
EXPECT_EQ( 0, dev->get_state() );
234237

235238
res = G_OPCUA_SERVER.method_on( nullptr, nullptr, nullptr,

0 commit comments

Comments
 (0)