reset EnvoronmentContext between test to avoid influence one test on another (#15933)
parent
f4d8ad9a0b
commit
c3b4b796f5
|
|
@ -54,6 +54,7 @@ import org.eclipse.che.workspace.infrastructure.kubernetes.KubernetesClientFacto
|
|||
import org.eclipse.che.workspace.infrastructure.kubernetes.api.shared.KubernetesNamespaceMeta;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.testng.MockitoTestNGListener;
|
||||
import org.testng.annotations.AfterMethod;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Listeners;
|
||||
import org.testng.annotations.Test;
|
||||
|
|
@ -95,6 +96,11 @@ public class KubernetesNamespaceFactoryTest {
|
|||
.thenReturn(new UserImpl(USER_ID, "test@mail.com", USER_NAME));
|
||||
}
|
||||
|
||||
@AfterMethod
|
||||
public void tearDown() {
|
||||
EnvironmentContext.reset();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldNotThrowExceptionIfDefaultNamespaceIsSpecifiedOnCheckingIfNamespaceIsAllowed()
|
||||
throws Exception {
|
||||
|
|
|
|||
Loading…
Reference in New Issue