From 9f331b1bf9a1d3f4552f0fe6dff1aaba01b1be0e Mon Sep 17 00:00:00 2001 From: Tuukka Lehtonen Date: Fri, 30 Aug 2019 15:12:53 +0300 Subject: [PATCH] Report non-existent .sts tests using error logger instead of NPE crash gitlab #367 Change-Id: I55408e6b8b539bb3775e7ff5afc7f32323e32eb2 --- .../org/simantics/db/testing/base/SCLScriptTestBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/SCLScriptTestBase.java b/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/SCLScriptTestBase.java index 459be8d4a..511af6dc3 100644 --- a/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/SCLScriptTestBase.java +++ b/bundles/org.simantics.db.testing/src/org/simantics/db/testing/base/SCLScriptTestBase.java @@ -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(); -- 2.47.1