rkhachatryan commented on a change in pull request #15066:
URL: https://github.com/apache/flink/pull/15066#discussion_r590321580
##########
File path:
flink-connectors/flink-connector-jdbc/src/test/java/org/apache/flink/connector/jdbc/xa/SemanticXidGeneratorTest.java
##########
@@ -40,21 +40,25 @@ public void testXidsUniqueAmongCheckpoints() {
}
@Test
- public void testXidsUniqueAmongGenerators() {
+ public void testXidsUniqueAmongJobs() {
long checkpointId = 1L;
+ SemanticXidGenerator generator = new SemanticXidGenerator();
checkUniqueness(
unused -> {
- SemanticXidGenerator generator = new
SemanticXidGenerator();
generator.open();
return generator.generateXid(TEST_RUNTIME_CONTEXT,
checkpointId);
});
}
private void checkUniqueness(Function<Integer, Xid> generate) {
Set<Xid> generated = new HashSet<>();
+ Set<byte[]> gtrids = new HashSet<>();
Review comment:
Probably the easiest way to fix it is to "drop" the branch id:
```
generated.add(new XidImpl(0, generate.apply(i).getGlobalTransactionId(), new
byte[0]));
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]