From d6f19150bf0bc5025898535e6602846cc5d42eff Mon Sep 17 00:00:00 2001 From: David Cantrell Date: Sun, 3 Oct 2021 23:52:25 +0100 Subject: [PATCH] twiddle tests to mock time instead of doing an actual sleep, so virtualisation doesn't utterly banjax everything --- Makefile.PL | 5 ++++- t/all.t | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL index 21a5f9f..a78bcf1 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,5 +9,8 @@ WriteMakefile( } }, VERSION => '1.1.1', - PREREQ_PM => { Time::HiRes => 1.2 } + PREREQ_PM => { + Time::HiRes => 1.2, + Test::Mock::Time => 0, + } ); diff --git a/t/all.t b/t/all.t index 9be7521..8558483 100755 --- a/t/all.t +++ b/t/all.t @@ -7,6 +7,7 @@ use strict; BEGIN { $| = 1; print "1..4\n"; } END { print "not ok 1\n" unless $loaded; } +use Test::Mock::Time; use Tie::Scalar::Decay; $loaded=1;