From 83ca67649263bd5451807c446e03fa02a2429410 Mon Sep 17 00:00:00 2001 From: Kotaro Terada Date: Tue, 9 Oct 2018 18:31:41 +0900 Subject: [PATCH] NIFI-5681: Fix a locale-dependent test in TestVersionedFlowSnapshotMetadataResult Signed-off-by: Pierre Villard This closes #3061. --- .../TestVersionedFlowSnapshotMetadataResult.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nifi-toolkit/nifi-toolkit-cli/src/test/java/org/apache/nifi/toolkit/cli/impl/result/TestVersionedFlowSnapshotMetadataResult.java b/nifi-toolkit/nifi-toolkit-cli/src/test/java/org/apache/nifi/toolkit/cli/impl/result/TestVersionedFlowSnapshotMetadataResult.java index 7f6f6d6bf8..c364096639 100644 --- a/nifi-toolkit/nifi-toolkit-cli/src/test/java/org/apache/nifi/toolkit/cli/impl/result/TestVersionedFlowSnapshotMetadataResult.java +++ b/nifi-toolkit/nifi-toolkit-cli/src/test/java/org/apache/nifi/toolkit/cli/impl/result/TestVersionedFlowSnapshotMetadataResult.java @@ -69,13 +69,13 @@ public class TestVersionedFlowSnapshotMetadataResult { //System.out.println(resultOut); // can't get the time zone to line up on travis, so ignore this for now - final String expected = "\n" + - "Ver Date Author Message \n" + - "--- -------------------------- ------ ---------------------------------------- \n" ;//+ + final String expectedPattern = "^\\n" + + "Ver +Date + Author + Message +\\n" + + "-+ +-+ +-+ +-+ +\\n" + //"1 Wed, Feb 14 2018 12:00 EST user1 This is a long comment, longer than t... \n" + //"2 Wed, Feb 14 2018 12:30 EST user2 This is v2 \n" + - //"\n"; + "(.|\\n)+$"; - Assert.assertTrue(resultOut.startsWith(expected)); + Assert.assertTrue(resultOut.matches(expectedPattern)); } }