From 9eae36a7028a7c08869ec2e7c2f31f0aa49ecb4c Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 4 Apr 2017 21:15:22 -0400 Subject: [PATCH] Fixed flapping archive stop tests. --- doc/xml/release.xml | 4 ++++ test/lib/pgBackRestTest/Archive/ArchiveStopTest.pm | 9 ++++----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 1d040e3ec..f7bcf4788 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -179,6 +179,10 @@

Updated vagrant to new version and image.

+ + +

Fixed flapping archive stop tests.

+
diff --git a/test/lib/pgBackRestTest/Archive/ArchiveStopTest.pm b/test/lib/pgBackRestTest/Archive/ArchiveStopTest.pm index 10d0be23a..b4fca4245 100644 --- a/test/lib/pgBackRestTest/Archive/ArchiveStopTest.pm +++ b/test/lib/pgBackRestTest/Archive/ArchiveStopTest.pm @@ -96,19 +96,18 @@ sub run #--------------------------------------------------------------------------------------------------------------------------- $self->testResult( - sub {$oFile->list(PATH_BACKUP_ARCHIVE, PG_VERSION_94 . '-1/0000000100000001')}, + sub {$oFile->list(PATH_BACKUP_ARCHIVE, PG_VERSION_94 . '-1/0000000100000001', '^(?!000000010000000100000002).+')}, "000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7${strCompressExt}", - 'segment 2-4 are not pushed', 5); + 'segment 2-4 not pushed (2 is pushed sometimes when remote but ignore)', 5); #--------------------------------------------------------------------------------------------------------------------------- $oHostDbMaster->archivePush($strXlogPath, $strArchiveTestFile, 5); $self->testResult( - sub {$oFile->list(PATH_BACKUP_ARCHIVE, PG_VERSION_94 . '-1/0000000100000001')}, + sub {$oFile->list(PATH_BACKUP_ARCHIVE, PG_VERSION_94 . '-1/0000000100000001', '^(?!000000010000000100000002).+')}, "(000000010000000100000001-72b9da071c13957fb4ca31f05dbd5c644297c2f7${strCompressExt}, " . - ($bRemote ? "000000010000000100000002-72b9da071c13957fb4ca31f05dbd5c644297c2f7${strCompressExt}, " : '') . "000000010000000100000005-72b9da071c13957fb4ca31f05dbd5c644297c2f7${strCompressExt})", - 'segment 5 (and 2 if remote) is pushed', 5); + 'segment 5 is pushed', 5); } } }