Metadata for name, version, tags and type
[ccsdk/cds.git] / ms / blueprintsprocessor / modules / blueprints / blueprint-core / src / test / kotlin / org / onap / ccsdk / cds / controllerblueprints / core / utils / BluePrintMetadataUtilsTest.kt
index 302daf6..6ccfe1e 100644 (file)
@@ -48,20 +48,22 @@ class BluePrintMetadataUtilsTest {
 
     @Test
     fun testKotlinBluePrintContext() {
-        val path = normalizedPathName("src/test/resources/compile")
-        val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(path)
-        assertNotNull(blueprintContext, "failed to get blueprint context")
-        assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
-        assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
-        assertNotNull(blueprintContext.otherDefinitions, "failed to get blueprint contextother definitions")
+        runBlocking {
+            val path = normalizedPathName("src/test/resources/compile")
+            val blueprintContext = BluePrintMetadataUtils.getBluePrintContext(path)
+            assertNotNull(blueprintContext, "failed to get blueprint context")
+            assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
+            assertNotNull(blueprintContext.serviceTemplate, "failed to get blueprint context service template")
+            assertNotNull(blueprintContext.otherDefinitions, "failed to get blueprint contextother definitions")
 
-        var cachePresent = BluePrintCompileCache.hasClassLoader(path)
-        assertTrue(cachePresent, "failed to generate cache key ($path)")
+            var cachePresent = BluePrintCompileCache.hasClassLoader(path)
+            assertTrue(cachePresent, "failed to generate cache key ($path)")
 
-        /** Cleaning Cache */
-        BluePrintCompileCache.cleanClassLoader(path)
-        cachePresent = BluePrintCompileCache.hasClassLoader(path)
-        assertTrue(!cachePresent, "failed to remove cache key ($path)")
+            /** Cleaning Cache */
+            BluePrintCompileCache.cleanClassLoader(path)
+            cachePresent = BluePrintCompileCache.hasClassLoader(path)
+            assertTrue(!cachePresent, "failed to remove cache key ($path)")
+        }
     }
 
     @Test