[java-metadata-aggregator] branch master updated: MDA-191 - more detailed check on Instant toString values

Ian Young ian at iay.org.uk
Wed Jan 31 13:01:58 EST 2018


This is an automated email from the git hooks/post-receive script.

iay pushed a commit to branch master
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=fb6541328edf7604a388af381dc8bedaa60a76dc

The following commit(s) were added to refs/heads/master by this push:
       new  fb65413   MDA-191 - more detailed check on Instant toString values
fb65413 is described below

commit fb6541328edf7604a388af381dc8bedaa60a76dc
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Jan 31 18:01:53 2018 +0000

    MDA-191 - more detailed check on Instant toString values
---
 .../java/net/shibboleth/metadata/pipeline/ComponentInfoTest.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ComponentInfoTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ComponentInfoTest.java
index e6e20f0..8cb8209 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ComponentInfoTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ComponentInfoTest.java
@@ -45,9 +45,11 @@ public class ComponentInfoTest {
         Assert.assertEquals(infos.get(2).getComponentId(), "pipe", "2");
 
         // Check that we're getting ISO 8601 Z time out from toString
+        final String zuluPattern =
+                "\\d\\d\\d\\d-\\d\\d-\\d\\dT\\d\\d:\\d\\d:\\d\\d\\.\\d\\d\\dZ";
         for (final ComponentInfo c : infos) {
-            Assert.assertTrue(c.getStartInstant().toString().matches("\\d\\d\\d\\d-\\d\\d-\\d\\dT.*Z"), "start");
-            Assert.assertTrue(c.getCompleteInstant().toString().matches("\\d\\d\\d\\d-\\d\\d-\\d\\dT.*Z"), "complete");
+            Assert.assertTrue(c.getStartInstant().toString().matches(zuluPattern), "start");
+            Assert.assertTrue(c.getCompleteInstant().toString().matches(zuluPattern), "complete");
         }
     }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list