When building CLAMP, a test failure was noticed on the
LoopRepositoriesItCase test case. THe root cause was because the
LoopRepositoriesItCase did not clean up its test configuraiton. When the
test order randomly changed, this test was run before the
LoopRepositoriesItCase test case, causing that test case to fail due to
test data residue.
Issue-ID: CLAMP-946
Change-Id: I2c00bbca4ee9f9291ad2c2d565a519daee963c6d
Signed-off-by: liamfallon <liam.fallon@est.tech>
* reserved.
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
* reserved.
* ================================================================================
* Modifications Copyright (c) 2019 Samsung
+ * Modifications Copyright (C) 2020 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
import java.util.Arrays;
import java.util.Collection;
import org.apache.camel.Exchange;
import java.util.Arrays;
import java.util.Collection;
import org.apache.camel.Exchange;
+import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
+ @AfterClass
+
+ public static void afterCleanup() {
+ sc.setAuthentication(null);
+ }
+
@Test
public void testIsUserPermitted() {
assertEquals(AuthorizationController.getPrincipalName(sc),"admin");
@Test
public void testIsUserPermitted() {
assertEquals(AuthorizationController.getPrincipalName(sc),"admin");