apigear-io / template-cpp14

C++14 technology template
https://apigear.io/template-cpp14/docs/intro
MIT License
0 stars 2 forks source link

[BUG]: the olink network tests seem to be flaky on Windows/Mac #141

Open w4bremer opened 4 months ago

w4bremer commented 4 months ago

Description of the bug

The olink network tests seem to fail occasionally without an obivious reason. This needs to be fixed and made more reliable for CI tests.

[100%] Built target MQTTClient
Running tests...
Test project /home/runner/work/template-cpp14/template-cpp14/goldenmaster/build
      Start  1: test_apigear_utilities
 1/12 Test  #1: test_apigear_utilities ...........   Passed    0.00 sec
      Start  2: test_tracer
 2/12 Test  #2: test_tracer ......................   Passed    1.51 sec
      Start  3: test_poco_olink
 3/12 Test  #3: test_poco_olink ..................***Failed    6.49 sec

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test_poco_olink is a Catch v2.13.8 host application.
Run with -? for options

-------------------------------------------------------------------------------
OlinkConnection tests
  Add sink after connecting to host. On teardown disconnect the client from
  server first. 
-------------------------------------------------------------------------------
/home/runner/work/template-cpp14/template-cpp14/goldenmaster/apigear/olink/tests/olink_connection.test.cpp:127
...............................................................................

/home/runner/work/template-cpp14/template-cpp14/goldenmaster/build/_deps/trompeloeil-src/include/catch2/trompeloeil.hpp:54: FAILED:
  CHECK( failure.empty() )
with expansion:
  false
with message:
  failure := "/home/runner/work/template-cpp14/template-cpp14/goldenmaster/
  apigear/olink/tests/olink_connection.test.cpp:147
  Unfulfilled expectation:
  Expected *sink1.olinkOnInit(sink1Id, initProperties, testOlinkConnection->
  node().get()) to be called once, actually never called
    param  _1 == tests.sink1
    param  _2 == {"property1":"some_string","property2":9,"property3":false}
    param  _3 == 0x55c70cffa0b0
  "

===============================================================================
test cases:   3 |   2 passed | 1 failed
assertions: 237 | 236 passed | 1 failed

Steps To Reproduce

  1. Run the test_poco_olinkunit tests either locally or check the CI system.
  2. E.g. a link for a recent failed run https://github.com/apigear-io/template-cpp14/actions/runs/10008342102/job/27664824375?pr=138#step:18:490

Additional Information

No response

w4bremer commented 4 months ago

This error also occurs on Mac in the same test case. https://github.com/apigear-io/template-cpp14/actions/runs/10008342102/job/27664825600?pr=138#step:18:538

-------------------------------------------------------------------------------
OlinkConnection tests
  Add sink after connecting to host. On teardown disconnect the client from
  server first. 
-------------------------------------------------------------------------------
/Users/runner/work/template-cpp14/template-cpp14/goldenmaster/apigear/olink/tests/olink_connection.test.cpp:127
...............................................................................

/Users/runner/work/template-cpp14/template-cpp14/goldenmaster/build/_deps/trompeloeil-src/include/catch2/trompeloeil.hpp:54: FAILED:
  CHECK( failure.empty() )
with expansion:
  false
with message:
  failure := "/Users/runner/work/template-cpp14/template-cpp14/goldenmaster/
  apigear/olink/tests/olink_connection.test.cpp:147
  Unfulfilled expectation:
  Expected *sink1.olinkOnInit(sink1Id, initProperties, testOlinkConnection->
  node().get()) to be called once, actually never called
    param  _1 == tests.sink1
    param  _2 == {"property1":"some_string","property2":9,"property3":false}
    param  _3 == 0x1337041b0
  "