Improve test robustness (was failing on a Mac VM)

Store and compare the complete time-stamp, not just the seconds field.
This commit is contained in:
Andrew Johnson
2016-04-21 11:13:19 -05:00
parent bde691f6b6
commit 6e0b772880

View File

@@ -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());
}