Skip to content

Commit 6930733

Browse files
author
Daniil Zulin
committed
Revert rename
1 parent 03acd84 commit 6930733

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

topic/src/test/java/tech/ydb/topic/impl/YdbTopicsIntegrationTest.java

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,9 @@ public class YdbTopicsIntegrationTest {
5353
@ClassRule
5454
public final static GrpcTransportRule ydbTransport = new GrpcTransportRule();
5555

56-
private final static String TEST_TOPIC1 = "integration_test_topic";
57-
private final static String TEST_TOPIC2 = "integration_test_other_topic";
56+
private final static String TEST_TOPIC = "integration_test_topic";
57+
private final static String TEST_OTHER_TOPIC = "integration_test_other_topic";
58+
5859
private final static String TEST_CONSUMER1 = "consumer";
5960
private final static String TEST_CONSUMER2 = "other_consumer";
6061

@@ -70,10 +71,10 @@ public class YdbTopicsIntegrationTest {
7071

7172
@BeforeClass
7273
public static void initTopic() {
73-
logger.info("Create test topic {} ...", TEST_TOPIC1);
74+
logger.info("Create test topic {} ...", TEST_TOPIC);
7475

7576
client = TopicClient.newClient(ydbTransport).build();
76-
client.createTopic(TEST_TOPIC1, CreateTopicSettings.newBuilder()
77+
client.createTopic(TEST_TOPIC, CreateTopicSettings.newBuilder()
7778
.addConsumer(Consumer.newBuilder().setName(TEST_CONSUMER1).build())
7879
.addConsumer(Consumer.newBuilder().setName(TEST_CONSUMER2).build())
7980
.build()
@@ -82,16 +83,16 @@ public static void initTopic() {
8283

8384
@AfterClass
8485
public static void dropTopic() {
85-
logger.info("Drop test topic {} ...", TEST_TOPIC1);
86-
Status dropStatus = client.dropTopic(TEST_TOPIC1).join();
86+
logger.info("Drop test topic {} ...", TEST_TOPIC);
87+
Status dropStatus = client.dropTopic(TEST_TOPIC).join();
8788
client.close();
8889
dropStatus.expectSuccess("can't drop test topic");
8990
}
9091

9192
@Test
9293
public void step01_writeWithoutDeduplication() throws InterruptedException, ExecutionException, TimeoutException {
9394
WriterSettings settings = WriterSettings.newBuilder()
94-
.setTopicPath(TEST_TOPIC1)
95+
.setTopicPath(TEST_TOPIC)
9596
.build();
9697
SyncWriter writer = client.createSyncWriter(settings);
9798
writer.init();
@@ -111,7 +112,7 @@ public void step01_writeWithoutDeduplication() throws InterruptedException, Exec
111112
@Test
112113
public void step02_readHalfWithoutCommit() throws InterruptedException {
113114
ReaderSettings settings = ReaderSettings.newBuilder()
114-
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC1).build())
115+
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC).build())
115116
.setConsumerName(TEST_CONSUMER1)
116117
.build();
117118

@@ -129,7 +130,7 @@ public void step02_readHalfWithoutCommit() throws InterruptedException {
129130
@Test
130131
public void step03_readHalfWithCommit() throws InterruptedException {
131132
ReaderSettings settings = ReaderSettings.newBuilder()
132-
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC1).build())
133+
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC).build())
133134
.setConsumerName(TEST_CONSUMER1)
134135
.build();
135136

@@ -148,7 +149,7 @@ public void step03_readHalfWithCommit() throws InterruptedException {
148149
@Test
149150
public void step03_readNextHalfWithoutCommit() throws InterruptedException {
150151
ReaderSettings settings = ReaderSettings.newBuilder()
151-
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC1).build())
152+
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC).build())
152153
.setConsumerName(TEST_CONSUMER1)
153154
.build();
154155

@@ -170,7 +171,7 @@ public void step03_readNextHalfWithoutCommit() throws InterruptedException {
170171
@Test
171172
public void step04_readNextHalfWithCommit() throws InterruptedException {
172173
ReaderSettings settings = ReaderSettings.newBuilder()
173-
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC1).build())
174+
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC).build())
174175
.setConsumerName(TEST_CONSUMER1)
175176
.build();
176177

@@ -194,7 +195,7 @@ public void step04_readNextHalfWithCommit() throws InterruptedException {
194195

195196
@Test
196197
public void step05_describeTopic() {
197-
TopicDescription description = client.describeTopic(TEST_TOPIC1).join().getValue();
198+
TopicDescription description = client.describeTopic(TEST_TOPIC).join().getValue();
198199

199200
Assert.assertNull(description.getTopicStats());
200201
List<Consumer> consumers = description.getConsumers();
@@ -207,7 +208,7 @@ public void step05_describeTopic() {
207208
@Test
208209
public void step06_readAllByAsyncReader() throws InterruptedException {
209210
ReaderSettings settings = ReaderSettings.newBuilder()
210-
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC1).build())
211+
.addTopic(TopicReadSettings.newBuilder().setPath(TEST_TOPIC).build())
211212
.setConsumerName(TEST_CONSUMER2)
212213
.build();
213214

@@ -246,7 +247,7 @@ public void onMessages(DataReceivedEvent dre) {
246247

247248
@Test
248249
public void step07_alterTopicWithAutoPartitioning() {
249-
client.alterTopic(TEST_TOPIC1, AlterTopicSettings.newBuilder()
250+
client.alterTopic(TEST_TOPIC, AlterTopicSettings.newBuilder()
250251
.setAlterPartitioningSettings(AlterPartitioningSettings.newBuilder()
251252
.setAutoPartitioningStrategy(AutoPartitioningStrategy.SCALE_UP)
252253
.setMaxActivePartitions(10)
@@ -258,7 +259,7 @@ public void step07_alterTopicWithAutoPartitioning() {
258259
.build())
259260
.build()).join().expectSuccess("can't alter the topic");
260261

261-
TopicDescription description = client.describeTopic(TEST_TOPIC1).join().getValue();
262+
TopicDescription description = client.describeTopic(TEST_TOPIC).join().getValue();
262263

263264
PartitioningSettings actualPartitioningSettings = description.getPartitioningSettings();
264265
PartitioningSettings expectedPartitioningSettings = PartitioningSettings.newBuilder()
@@ -288,13 +289,13 @@ public void step08_createTopicWithAutoPartitioning() {
288289
.build())
289290
.build();
290291

291-
CompletableFuture<Status> secondaryTopicCreated = client.createTopic(TEST_TOPIC2, CreateTopicSettings.newBuilder()
292+
CompletableFuture<Status> secondaryTopicCreated = client.createTopic(TEST_OTHER_TOPIC, CreateTopicSettings.newBuilder()
292293
.setPartitioningSettings(expectedPartitioningSettings)
293294
.build());
294295

295296
secondaryTopicCreated.join().expectSuccess("can't create the topic");
296297

297-
TopicDescription description = client.describeTopic(TEST_TOPIC2).join().getValue();
298+
TopicDescription description = client.describeTopic(TEST_OTHER_TOPIC).join().getValue();
298299

299300
Assert.assertEquals(expectedPartitioningSettings, description.getPartitioningSettings());
300301
}

0 commit comments

Comments
 (0)