HA service UT sporadically fail under thread sanitizer
[ RUN ] HAServiceTest.sendUpdatesControlResultErrorMultiThreading
ha_service_unittest.cc:1378: Failure
Expected equality of these values:
2
factory3_->getResponseCreator()->getReceivedRequests().size()
Which is: 1
ha_service_unittest.cc:1384: Failure
Value of: update_request3
Actual: false
Expected: true
[ FAILED ] HAServiceTest.sendUpdatesControlResultErrorMultiThreading (2 ms)
[ RUN ] HAServiceTest.sendSuccessfulUpdates6MultiThreading
ha_service_unittest.cc:1542: Failure
Expected equality of these values:
1
factory3_->getResponseCreator()->getReceivedRequests().size()
Which is: 0
ha_service_unittest.cc:1549: Failure
Value of: update_request3
Actual: false
Expected: true
[ FAILED ] HAServiceTest.sendSuccessfulUpdates6MultiThreading (2 ms)
[ RUN ] HAServiceTest.sendSuccessfulUpdatesMultiThreading
ha_service_unittest.cc:1120: Failure
Expected equality of these values:
2
factory3_->getResponseCreator()->getReceivedRequests().size()
Which is: 1
ha_service_unittest.cc:1126: Failure
Value of: update_request3
Actual: false
Expected: true
[ FAILED ] HAServiceTest.sendSuccessfulUpdatesMultiThreading (2 ms)
It seems that all are caused by checks on the backup server.
It might be related to the stop condition on the IO service (wait for requests, not for replies)
// Actually perform the lease updates.
ASSERT_NO_THROW(runIOService(TEST_TIMEOUT, [this]() {
// Finish running IO service when there are no more pending requests.
return (service_->pendingRequestSize() == 0);
}));
Edited by Andrei Pavel