Skip to content

Commit

Permalink
fix cdc java ut
Browse files Browse the repository at this point in the history
  • Loading branch information
StrikeW committed Oct 16, 2023
1 parent e03cad0 commit 014b2ab
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ public void testLines() throws InterruptedException, SQLException {
int count = 0;
while (eventStream.hasNext()) {
List<CdcMessage> messages = eventStream.next().getEventsList();
for (CdcMessage ignored : messages) {
count++;
for (CdcMessage msg : messages) {
if (!msg.getPayload().isBlank()) {
count++;
}
}
if (count == 10000) {
if (count >= 10000) {
return count;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,12 @@ public void testLines() throws Exception {
while (eventStream.hasNext()) {
List<ConnectorServiceProto.CdcMessage> messages =
eventStream.next().getEventsList();
for (ConnectorServiceProto.CdcMessage ignored : messages) {
count++;
for (ConnectorServiceProto.CdcMessage msg : messages) {
if (!msg.getPayload().isBlank()) {
count++;
}
}
if (count == 10000) {
if (count >= 10000) {
return count;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class SourceTestClient {
static final Logger LOG = LoggerFactory.getLogger(SourceTestClient.class.getName());

// default port for connector service
static final int DEFAULT_PORT = 50051;
static final int DEFAULT_PORT = 60051;
private final ConnectorServiceGrpc.ConnectorServiceBlockingStub blockingStub;

public Properties sqlStmts = new Properties();
Expand Down

0 comments on commit 014b2ab

Please sign in to comment.