From c62be1823e23f07949937538f1601d8c09af3bdf Mon Sep 17 00:00:00 2001 From: Chris Sharp Date: Mon, 7 Nov 2016 19:10:06 -0500 Subject: [PATCH] Fix purge_user_activity.pg live test The purge_user_activity.pg test inserts rows into actor.usr_activity in a random date order, but the changes in bug 1570909 created a trigger that overwrites the previous entry for a transient type, causing the test to fail. We reorder the usr_activity rows so that the most recent row will be in place. Signed-off-by: Chris Sharp Signed-off-by: Jason Stephenson --- Open-ILS/src/sql/Pg/live_t/purge-user-activity.pg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/sql/Pg/live_t/purge-user-activity.pg b/Open-ILS/src/sql/Pg/live_t/purge-user-activity.pg index bf3814625f..b432dd84e9 100644 --- a/Open-ILS/src/sql/Pg/live_t/purge-user-activity.pg +++ b/Open-ILS/src/sql/Pg/live_t/purge-user-activity.pg @@ -8,14 +8,14 @@ SELECT plan(6); -- shuffle event_times for randomness. INSERT INTO actor.usr_activity (usr, etype, event_time) VALUES (:usr_one, 1, NOW() - '2 days'::INTERVAL), - (:usr_one, 1, NOW()), (:usr_one, 1, NOW() - '1 days'::INTERVAL), + (:usr_one, 1, NOW()), + (:usr_one, 2, NOW() - '2 days'::INTERVAL), (:usr_one, 2, NOW() - '1 days'::INTERVAL), (:usr_one, 2, NOW()), - (:usr_one, 2, NOW() - '2 days'::INTERVAL), + (:usr_two, 1, NOW() - '2 days'::INTERVAL), (:usr_two, 1, NOW() - '1 days'::INTERVAL), - (:usr_two, 1, NOW()), - (:usr_two, 1, NOW() - '2 days'::INTERVAL); + (:usr_two, 1, NOW()); SELECT actor.purge_usr_activity_by_type(1); -- 2.11.0