From 6e0b772880e638d5265d7c0f6408990bf0cb6cd1 Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Thu, 21 Apr 2016 11:13:19 -0500 Subject: [PATCH] Improve test robustness (was failing on a Mac VM) Store and compare the complete time-stamp, not just the seconds field. --- testApp/remote/channelAccessIFTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testApp/remote/channelAccessIFTest.cpp b/testApp/remote/channelAccessIFTest.cpp index c849b2a..dd34123 100644 --- a/testApp/remote/channelAccessIFTest.cpp +++ b/testApp/remote/channelAccessIFTest.cpp @@ -621,7 +621,7 @@ void ChannelAccessIFTest::test_channelGetIntProcessInternal(Channel::shared_poin for (int i = 0; i < numOfTimes; i++) { int previousValue = value->get(); - long previousTimestampSec = timeStamp.getSecondsPastEpoch(); + TimeStamp previousTimestamp = timeStamp; epicsThreadSleep(1.0); @@ -635,7 +635,7 @@ void ChannelAccessIFTest::test_channelGetIntProcessInternal(Channel::shared_poin testOk((previousValue +1)/*%11*/ == value->get(), "%s: testing the counter value change", testMethodName.c_str()); - testOk(timeStamp.getSecondsPastEpoch() > previousTimestampSec, + testOk(timeStamp > previousTimestamp, "%s: testing the timestamp change", testMethodName.c_str()); }