From 44534a13be68f91e3cbba250f9260a7ba8d6cd74 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 27 Jan 2015 01:41:57 +0000 Subject: Offset test data into tomorrow to avoid results changing as day goes by --- p2pvr/daemon/unittests/datasources/eventOffset.sql | 6 +++--- p2pvr/daemon/unittests/testSched.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/p2pvr/daemon/unittests/datasources/eventOffset.sql b/p2pvr/daemon/unittests/datasources/eventOffset.sql index 3c796ca..132b504 100644 --- a/p2pvr/daemon/unittests/datasources/eventOffset.sql +++ b/p2pvr/daemon/unittests/datasources/eventOffset.sql @@ -1,8 +1,8 @@ -- --- This SQL will update events in the sample data to start today +-- This SQL will update events in the sample data to start tomorrow (avoids things changing as day goes by) -- UPDATE events SET - starttime = starttime + (SELECT current_date - min(starttime) FROM events), - stoptime = stoptime + (SELECT current_date - min(starttime) FROM events) + starttime = starttime + (SELECT current_date - min(starttime) FROM events) + '1 day'::interval, + stoptime = stoptime + (SELECT current_date - min(starttime) FROM events) + '1 day'::interval diff --git a/p2pvr/daemon/unittests/testSched.cpp b/p2pvr/daemon/unittests/testSched.cpp index 5293bfa..bfa8567 100644 --- a/p2pvr/daemon/unittests/testSched.cpp +++ b/p2pvr/daemon/unittests/testSched.cpp @@ -70,7 +70,7 @@ BOOST_AUTO_TEST_CASE( sc_doReschedule ) BOOST_AUTO_TEST_CASE( sc_getScheduled ) { auto str = sc->GetScheduledToRecord(); - BOOST_REQUIRE_EQUAL(str.size(), 49); + BOOST_REQUIRE_EQUAL(str.size(), 62); } BOOST_AUTO_TEST_CASE( sc_crud ) -- cgit v1.2.3