diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2024-01-26 15:28:56 +0000 |
---|---|---|
committer | Adheli Tavares <adheli.tavares@est.tech> | 2024-02-09 10:31:15 +0000 |
commit | cc1d3d352771d1fa35d297e90663539e34b022f6 (patch) | |
tree | b1b00d678b0157742b91be1262fbf614a62063b1 /feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java | |
parent | cce79248655f484e007769ba81b092148f940d27 (diff) |
Removing deprecated DMAAP library
Issue-ID: POLICY-4402
Change-Id: I4ce5b303cb3a775010683d3c7102b0bd065280ea
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java')
-rw-r--r-- | feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java index f8a8cc20..a1fd2738 100644 --- a/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java +++ b/feature-test-transaction/src/test/java/org/onap/policy/drools/testtransaction/TestTransactionTest.java @@ -3,6 +3,7 @@ * feature-test-transaction * ================================================================================ * Copyright (C) 2017-2020 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +21,9 @@ package org.onap.policy.drools.testtransaction; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import java.io.IOException; import java.nio.file.Files; @@ -31,8 +33,8 @@ import java.util.Properties; import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import org.onap.policy.drools.persistence.SystemPersistenceConstants; import org.onap.policy.drools.properties.DroolsPropertyConstants; import org.onap.policy.drools.system.PolicyController; @@ -52,15 +54,14 @@ public class TestTransactionTest { TEST_CONTROLLER_NAME + "-controller.properties.bak"; /** logger. */ - private static Logger logger = LoggerFactory.getLogger(TestTransactionTest.class); + private static final Logger logger = LoggerFactory.getLogger(TestTransactionTest.class); /** * Start up. * - * @throws IOException exception */ - @BeforeClass - public static void startUp() throws IOException { + @BeforeAll + public static void startUp() { logger.info("enter"); cleanUpWorkingDir(); @@ -70,7 +71,7 @@ public class TestTransactionTest { } @Test - public void testRegisterUnregister() throws InterruptedException { + void testRegisterUnregister() throws InterruptedException { final Properties controllerProperties = new Properties(); controllerProperties.put(DroolsPropertyConstants.PROPERTY_CONTROLLER_NAME, TEST_CONTROLLER_NAME); final PolicyController controller = @@ -80,7 +81,7 @@ public class TestTransactionTest { CountDownLatch latch = new CountDownLatch(1); - // use our own impl so we can decrement the latch when run() completes + // use our own impl, so we can decrement the latch when run() completes TtImpl impl = new TtImpl() { @Override protected TtControllerTask makeControllerTask(PolicyController controller) { @@ -104,7 +105,7 @@ public class TestTransactionTest { impl.unregister(controller); Thread ttThread = getThread(latch, "tt-controller-task-" + TEST_CONTROLLER_NAME); - assertEquals(null, ttThread); + assertNull(ttThread); } /** |