Upgrade tests to TestNG 7.1

See gh-24298
This commit is contained in:
Sam Brannen 2020-05-09 17:36:25 +02:00
parent 73e3df5df5
commit 745cfcb161
2 changed files with 4 additions and 6 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.testng.ITestNGListener;
import org.testng.TestNG;
import org.springframework.beans.factory.annotation.Autowired;
@ -140,7 +139,7 @@ class ClassLevelDirtiesContextTestNGTests {
final TrackingTestNGTestListener listener = new TrackingTestNGTestListener();
final TestNG testNG = new TestNG();
testNG.addListener((ITestNGListener) listener);
testNG.addListener(listener);
testNG.setTestClasses(new Class<?>[] { testClass });
testNG.setVerbose(0);
testNG.run();

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -21,7 +21,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.testng.ITestNGListener;
import org.testng.TestNG;
import org.springframework.test.context.ContextConfiguration;
@ -97,7 +96,7 @@ public class FailingBeforeAndAfterMethodsTestNGTests {
public void runTestAndAssertCounters() throws Exception {
TrackingTestNGTestListener listener = new TrackingTestNGTestListener();
TestNG testNG = new TestNG();
testNG.addListener((ITestNGListener) listener);
testNG.addListener(listener);
testNG.setTestClasses(new Class<?>[] {this.clazz});
testNG.setVerbose(0);
testNG.run();