From 2f5ce99c70c1ab35212479b8d4edc6fc568b7ff9 Mon Sep 17 00:00:00 2001
From: Brandon Clayton <bclayton@usgs.gov>
Date: Fri, 1 Sep 2023 11:07:42 -0600
Subject: [PATCH] load model

---
 .../java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
index e951a913..cb390cc0 100644
--- a/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
+++ b/src/test/java/gov/usgs/earthquake/nshmp/model/NshmTestUtils.java
@@ -84,16 +84,14 @@ class NshmTestUtils {
    * @param nshm The NSHM to test
    */
   static void testNshm(Nshm nshm, Optional<Path> dataPath) {
-    NshmModel nshmModel = dataPath.isPresent() ? null : loadModel(nshm);
+    NshmModel nshmModel = loadModel(nshm);
 
     for (NamedLocation location : nshm.locations()) {
       LOGGER.info("Location: " + location.toString());
       compareCurves(nshmModel, location, dataPath);
     }
 
-    if (nshmModel != null) {
-      nshmModel.exec.shutdown();
-    }
+    nshmModel.exec.shutdown();
   }
 
   /**
-- 
GitLab