Skip to content

Commit d0d40d0

Browse files
authored
[oceanbase][test] Use memory mode of obcdc and double startup timeout duration (#1474)
This closes #1473.
1 parent cfbd00f commit d0d40d0

File tree

5 files changed

+27
-11
lines changed

5 files changed

+27
-11
lines changed

docs/content/connectors/oceanbase-cdc.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ Flink SQL> CREATE TABLE orders (
8585
'port' = '2881',
8686
'rootserver-list' = '127.0.0.1:2882:2881',
8787
'logproxy.host' = '127.0.0.1',
88-
'logproxy.port' = '2983');
88+
'logproxy.port' = '2983',
89+
'working-mode' = 'memory'
90+
);
8991
9092
-- read snapshot and binlogs from orders table
9193
Flink SQL> SELECT * FROM orders;
@@ -316,7 +318,9 @@ CREATE TABLE products (
316318
'port' = '2881',
317319
'rootserver-list' = '127.0.0.1:2882:2881',
318320
'logproxy.host' = '127.0.0.1',
319-
'logproxy.port' = '2983');
321+
'logproxy.port' = '2983',
322+
'working-mode' = 'memory'
323+
);
320324
```
321325
322326
Features

docs/content/quickstart/oceanbase-tutorial.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@ Flink SQL> CREATE TABLE orders (
139139
'port' = '2881',
140140
'rootserver-list' = '127.0.0.1:2882:2881',
141141
'logproxy.host' = 'localhost',
142-
'logproxy.port' = '2983');
142+
'logproxy.port' = '2983',
143+
'working-mode' = 'memory'
144+
);
143145
144146
-- create products table
145147
Flink SQL> CREATE TABLE products (
@@ -159,7 +161,9 @@ Flink SQL> CREATE TABLE products (
159161
'port' = '2881',
160162
'rootserver-list' = '127.0.0.1:2882:2881',
161163
'logproxy.host' = 'localhost',
162-
'logproxy.port' = '2983');
164+
'logproxy.port' = '2983',
165+
'working-mode' = 'memory'
166+
);
163167
164168
-- create flat table enriched_orders
165169
Flink SQL> CREATE TABLE enriched_orders (

docs/content/快速上手/oceanbase-tutorial-zh.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ Flink SQL> CREATE TABLE orders (
137137
'port' = '2881',
138138
'rootserver-list' = '127.0.0.1:2882:2881',
139139
'logproxy.host' = 'localhost',
140-
'logproxy.port' = '2983');
140+
'logproxy.port' = '2983',
141+
'working-mode' = 'memory'
142+
);
141143
142144
-- 创建商品表
143145
Flink SQL> CREATE TABLE products (
@@ -157,7 +159,9 @@ Flink SQL> CREATE TABLE products (
157159
'port' = '2881',
158160
'rootserver-list' = '127.0.0.1:2882:2881',
159161
'logproxy.host' = 'localhost',
160-
'logproxy.port' = '2983');
162+
'logproxy.port' = '2983',
163+
'working-mode' = 'memory'
164+
);
161165
162166
-- 创建关联后的订单数据表
163167
Flink SQL> CREATE TABLE enriched_orders (

flink-connector-oceanbase-cdc/src/test/java/com/ververica/cdc/connectors/oceanbase/OceanBaseTestBase.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ public class OceanBaseTestBase extends TestLogger {
5454
private static final Logger LOG = LoggerFactory.getLogger(OceanBaseTestBase.class);
5555

5656
private static final Pattern COMMENT_PATTERN = Pattern.compile("^(.*)--.*$");
57+
private static final Duration CONTAINER_STARTUP_TIMEOUT = Duration.ofMinutes(4);
5758

5859
public static final int OB_SERVER_SQL_PORT = 2881;
5960
public static final int OB_SERVER_RPC_PORT = 2882;
@@ -112,7 +113,7 @@ protected static String getPassword() {
112113
.withExposedPorts(OB_SERVER_SQL_PORT, OB_SERVER_RPC_PORT)
113114
.withEnv("OB_ROOT_PASSWORD", OB_SYS_PASSWORD)
114115
.waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
115-
.withStartupTimeout(Duration.ofSeconds(120))
116+
.withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)
116117
.withLogConsumer(new Slf4jLogConsumer(LOG));
117118

118119
@ClassRule
@@ -123,7 +124,7 @@ protected static String getPassword() {
123124
.withEnv("OB_SYS_USERNAME", OB_SYS_USERNAME)
124125
.withEnv("OB_SYS_PASSWORD", OB_SYS_PASSWORD)
125126
.waitingFor(Wait.forLogMessage(".*boot success!.*", 1))
126-
.withStartupTimeout(Duration.ofSeconds(120))
127+
.withStartupTimeout(CONTAINER_STARTUP_TIMEOUT)
127128
.withLogConsumer(new Slf4jLogConsumer(LOG));
128129

129130
@BeforeClass

flink-connector-oceanbase-cdc/src/test/java/com/ververica/cdc/connectors/oceanbase/table/OceanBaseConnectorITCase.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public void testTableList() throws Exception {
9797
+ " 'port' = '%s',"
9898
+ " 'logproxy.host' = '%s',"
9999
+ " 'logproxy.port' = '%s',"
100-
+ " 'rootserver-list' = '%s'"
100+
+ " 'rootserver-list' = '%s',"
101+
+ " 'working-mode' = 'memory'"
101102
+ ")",
102103
getUsername(),
103104
getPassword(),
@@ -220,7 +221,8 @@ public void testMetadataColumns() throws Exception {
220221
+ " 'port' = '%s',"
221222
+ " 'logproxy.host' = '%s',"
222223
+ " 'logproxy.port' = '%s',"
223-
+ " 'rootserver-list' = '%s'"
224+
+ " 'rootserver-list' = '%s',"
225+
+ " 'working-mode' = 'memory'"
224226
+ ")",
225227
getUsername(),
226228
getPassword(),
@@ -342,7 +344,8 @@ public void testAllDataTypes() throws Exception {
342344
+ " 'port' = '%s',"
343345
+ " 'logproxy.host' = '%s',"
344346
+ " 'logproxy.port' = '%s',"
345-
+ " 'rootserver-list' = '%s'"
347+
+ " 'rootserver-list' = '%s',"
348+
+ " 'working-mode' = 'memory'"
346349
+ ")",
347350
getUsername(),
348351
getPassword(),

0 commit comments

Comments
 (0)