diff --git a/pom.xml b/pom.xml index 6fe68ca..010ddc8 100644 --- a/pom.xml +++ b/pom.xml @@ -1,141 +1,162 @@ - 4.0.0 + 4.0.0 - so.dang.cool - singleton - 1.0.0 - jar + so.dang.cool + singleton + 1 + jar - singleton - A simple singleton interface. - https://github.com/hiljusti/singleton + singleton + A simple singleton interface. + https://github.com/hiljusti/singleton - - - MIT License - https://github.com/hiljusti/singleton/blob/HEAD/LICENSE - https://github.com/hiljusti/singleton - - + + + MIT License + https://github.com/hiljusti/singleton/blob/HEAD/LICENSE + https://github.com/hiljusti/singleton + + - - - J.R. Hill - hiljusti@so.dang.cool - https://so.dang.cool - - + + + J.R. Hill + hiljusti@so.dang.cool + https://so.dang.cool + + - - scm:git:git://github.com/hiljusti/singleton.git - scm:git:git@github.com:hiljusti/singleton.git - https://github.com/hiljusti/singleton/tree/core - v1.0.0 - + + scm:git:git://github.com/hiljusti/singleton.git + scm:git:git@github.com:hiljusti/singleton.git + https://github.com/hiljusti/singleton/tree/core + v1 + - - UTF-8 - 1.8 - 1.8 - + + UTF-8 + 1.8 + 1.8 + - - - org.junit.jupiter - junit-jupiter - 5.8.1 - test - - + + + org.junit.jupiter + junit-jupiter + 5.8.1 + test + + - - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5.3 - - true - false - release - deploy - - - - org.apache.maven.plugins - maven-source-plugin - 3.0.1 - - - attach-sources - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.0.1 - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.6 - - - sign-artifacts - verify - - sign - - - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.8 - true - - ossrh - https://oss.sonatype.org/ - true - - - - - + + + + + + fr.jcgay.maven.plugins + buildplan-maven-plugin + 1.5 + - - - - maven-project-info-reports-plugin - - - + + + org.apache.maven.plugins + maven-release-plugin + 2.5.3 + + true + false + release + deploy + + + + org.apache.maven.plugins + maven-source-plugin + 3.0.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.0.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.6 + + + sign-artifacts + verify + + sign + + + ${gpg.keyname} + ${gpg.passphrase} + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + + + maven-surefire-plugin + 2.22.2 + + + maven-failsafe-plugin + 2.22.2 + + + + + + + + maven-project-info-reports-plugin + + + diff --git a/src/test/java/so/dang/cool/singleton/SingletonClassTests.java b/src/test/java/so/dang/cool/singleton/SingletonClassTests.java index 3470196..4f5a87f 100644 --- a/src/test/java/so/dang/cool/singleton/SingletonClassTests.java +++ b/src/test/java/so/dang/cool/singleton/SingletonClassTests.java @@ -79,8 +79,8 @@ public void stateObjExample() { Supplier slowNameSupplier = () -> { try { - long tenSeconds = 10 * 1000; - Thread.sleep(tenSeconds); + long twoSeconds = 2 * 1000; + Thread.sleep(twoSeconds); } catch (InterruptedException e) { // Hijinks occurred, but not important to the test. e.printStackTrace(); @@ -94,14 +94,14 @@ public void stateObjExample() { // A "warm-up" get. Instant beforeSlowGet = Instant.now(); assertEquals(name, jackie.getName()); - assertSlowerThan(Duration.ofSeconds(10), beforeSlowGet, Instant.now()); + assertSlowerThan(Duration.ofSeconds(2), beforeSlowGet, Instant.now()); // "Warmed-up" gets Instant beforeFastGet = Instant.now(); assertEquals(name, jackie.getName()); assertEquals(number, jackie.getNumber()); assertTrue(jackie.isCool()); - assertFasterThan(Duration.ofSeconds(1), beforeFastGet, Instant.now()); + assertFasterThan(Duration.ofMillis(50), beforeFastGet, Instant.now()); } private void assertSlowerThan(Duration expected, Instant start, Instant end) {