nodece commented on a change in pull request #14225:
URL: https://github.com/apache/pulsar/pull/14225#discussion_r806403190
##########
File path:
tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/topicpolicies/SchemaCompatibilityStrategyTest.java
##########
@@ -19,67 +19,68 @@
package org.apache.pulsar.tests.integration.cli.topicpolicies;
-import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertEquals;
import org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy;
import org.apache.pulsar.tests.integration.docker.ContainerExecResult;
-import org.apache.pulsar.tests.integration.suites.PulsarTestSuite;
+import org.apache.pulsar.tests.integration.suites.PulsarCliTestSuite;
import org.awaitility.Awaitility;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-public class SchemaCompatibilityStrategyTest extends PulsarTestSuite {
+public class SchemaCompatibilityStrategyTest extends PulsarCliTestSuite {
+ @BeforeMethod(alwaysRun = true)
Review comment:
There are some tests that will affect the results of another test, like
I set schema compatibility strategy at namespace level in
`testSchemaCompatibilityStrategyCmdWithNamespaceLevel`, if this test failed,
it will break the `testSchemaCompatibilityStrategyCmd` test result, so I use
`@BeforeMethod(alwaysRun = true)` instead of `@BeforeClass(alwaysRun = true)`
to avoid this thing, each test have own Pulsar is safe.
##########
File path:
tests/integration/src/test/java/org/apache/pulsar/tests/integration/cli/topicpolicies/SchemaCompatibilityStrategyTest.java
##########
@@ -19,67 +19,68 @@
package org.apache.pulsar.tests.integration.cli.topicpolicies;
-import static org.testng.Assert.assertTrue;
+import static org.testng.Assert.assertEquals;
import org.apache.pulsar.common.policies.data.SchemaCompatibilityStrategy;
import org.apache.pulsar.tests.integration.docker.ContainerExecResult;
-import org.apache.pulsar.tests.integration.suites.PulsarTestSuite;
+import org.apache.pulsar.tests.integration.suites.PulsarCliTestSuite;
import org.awaitility.Awaitility;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
-public class SchemaCompatibilityStrategyTest extends PulsarTestSuite {
+public class SchemaCompatibilityStrategyTest extends PulsarCliTestSuite {
+ @BeforeMethod(alwaysRun = true)
Review comment:
Your worry is necessary. I know that reset broker is somewhat expensive.
The `PulsarCliTestSuite` is abstract for cli test, normal we don't override the
`before` and `after` methods, which need to be overridden when tests need
isolation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]