Skip to content

Commit

Permalink
Subscription IT: explicitly declare setUp method for test class to …
Browse files Browse the repository at this point in the history
…avoid `UNKNOWN-IT` test class name (apache#13565)
  • Loading branch information
VGalaxies authored Sep 23, 2024
1 parent 612ccb5 commit 80b7805
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import org.apache.iotdb.subscription.it.IoTDBSubscriptionITConstant;

import org.apache.tsfile.write.record.Tablet;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -55,6 +56,12 @@ public class IoTDBSubscriptionTimePrecisionIT extends AbstractSubscriptionDualIT
private static final Logger LOGGER =
LoggerFactory.getLogger(IoTDBSubscriptionTimePrecisionIT.class);

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Override
protected void setUpConfig() {
super.setUpConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.apache.tsfile.read.query.dataset.QueryDataSet;
import org.apache.tsfile.write.record.Tablet;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -73,6 +74,12 @@ public class IoTDBSubscriptionTopicIT extends AbstractSubscriptionDualIT {

private static final Logger LOGGER = LoggerFactory.getLogger(IoTDBSubscriptionTopicIT.class);

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Override
protected void setUpConfig() {
super.setUpConfig();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.tsfile.read.expression.QueryExpression;
import org.apache.tsfile.read.query.dataset.QueryDataSet;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -65,6 +66,12 @@ public class IoTDBSubscriptionBasicIT extends AbstractSubscriptionLocalIT {

private static final Logger LOGGER = LoggerFactory.getLogger(IoTDBSubscriptionBasicIT.class);

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Test
public void testBasicPullConsumerWithCommitAsync() throws Exception {
// Insert some historical data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.tsfile.utils.Binary;
import org.apache.tsfile.write.record.Tablet;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -64,6 +65,12 @@ public class IoTDBSubscriptionDataTypeIT extends AbstractSubscriptionLocalIT {

private static final Logger LOGGER = LoggerFactory.getLogger(IoTDBSubscriptionDataTypeIT.class);

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

// ----------------------------- //
// SessionDataSetsHandler format //
// ----------------------------- //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.iotdb.session.subscription.consumer.SubscriptionPullConsumer;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -40,6 +41,12 @@ public class IoTDBSubscriptionIdempotentIT extends AbstractSubscriptionLocalIT {

private static final Logger LOGGER = LoggerFactory.getLogger(IoTDBSubscriptionIdempotentIT.class);

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Test
public void testSubscribeOrUnsubscribeNonExistedTopicTest() {
final String host = EnvFactory.getEnv().getIP();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.apache.iotdb.session.subscription.model.Topic;

import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -39,8 +40,14 @@
@Category({LocalStandaloneIT.class})
public class IoTDBSubscriptionTopicIT extends AbstractSubscriptionLocalIT {

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Test
public void testBasicCreateTopic() throws Exception {
public void testBasicCreateTopic() {
final String host = EnvFactory.getEnv().getIP();
final int port = Integer.parseInt(EnvFactory.getEnv().getPort());

Expand Down Expand Up @@ -76,7 +83,7 @@ public void testBasicCreateTopic() throws Exception {
}

@Test
public void testBasicCreateTopicIfNotExists() throws Exception {
public void testBasicCreateTopicIfNotExists() {
final String host = EnvFactory.getEnv().getIP();
final int port = Integer.parseInt(EnvFactory.getEnv().getPort());

Expand Down Expand Up @@ -118,7 +125,7 @@ public void testBasicCreateTopicIfNotExists() throws Exception {
topic = session.getTopic(topicName);
Assert.assertTrue(topic.isPresent());
Assert.assertEquals(topicName, topic.get().getTopicName());
// Verify Topic Parameters
// verify Topic Parameters
Assert.assertTrue(topic.get().getTopicAttributes().contains("path=root.**"));
Assert.assertTrue(topic.get().getTopicAttributes().contains("start-time=2023-01-01"));
Assert.assertFalse(topic.get().getTopicAttributes().contains("start-time=2023-01-02"));
Expand All @@ -131,7 +138,7 @@ public void testBasicCreateTopicIfNotExists() throws Exception {
}

@Test
public void testBasicDropTopic() throws Exception {
public void testBasicDropTopic() {
final String host = EnvFactory.getEnv().getIP();
final int port = Integer.parseInt(EnvFactory.getEnv().getPort());

Expand All @@ -152,7 +159,7 @@ public void testBasicDropTopic() throws Exception {
}

@Test
public void testBasicDropTopicIfExists() throws Exception {
public void testBasicDropTopicIfExists() {
final String host = EnvFactory.getEnv().getIP();
final int port = Integer.parseInt(EnvFactory.getEnv().getPort());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.apache.iotdb.session.subscription.SubscriptionSession;
import org.apache.iotdb.subscription.it.triple.regression.AbstractSubscriptionRegressionIT;

import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
Expand All @@ -33,6 +34,12 @@
@Category({MultiClusterIT2SubscriptionRegressionMisc.class})
public class IoTDBTestParamSubscriptionSessionIT extends AbstractSubscriptionRegressionIT {

@Override
@Before
public void setUp() throws Exception {
super.setUp();
}

@Test
public void testCreateSession_null_host() {
new SubscriptionSession.Builder().host(null).build();
Expand Down

0 comments on commit 80b7805

Please sign in to comment.