]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/SCLScriptTestBase.java
Report non-existent .sts tests using error logger instead of NPE crash
[simantics/platform.git] / bundles / org.simantics.db.testing / src / org / simantics / db / testing / base / SCLScriptTestBase.java
index 459be8d4a62228c70c52430c143c0459242706db..511af6dc3d3ec05e5646d25ed872e06d57740b0c 100644 (file)
@@ -81,8 +81,12 @@ public class SCLScriptTestBase extends FreshDatabaseTest {
 
         String testName = resolveTestName();
         TestRunnable runnable = testRunnables.get(testName);
-        long start = System.nanoTime(); 
+        if (runnable == null) {
+            LOGGER.error("SCL Test Suite file (.sts) for test {} cannot be found from test repository.", testName);
+            return;
+        }
 
+        long start = System.nanoTime(); 
         if (timeout > -1) {
             LOGGER.info("Running test {} with a timeout of {} seconds", testName, timeout); //$NON-NLS-1$
             Timer timer = new Timer();