DBZ-2637 fix unit test timeouts

This commit is contained in:
rkerner 2020-11-12 19:18:47 +01:00 committed by Jiri Pechanec
parent 77eee964a1
commit aff1df7573
3 changed files with 4 additions and 8 deletions

View File

@ -46,4 +46,4 @@ jobs:
restore-keys: | restore-keys: |
${{ runner.os }}-maven- ${{ runner.os }}-maven-
- name: Check changes in Debezium Connector Postgres - name: Check changes in Debezium Connector Postgres
run: mvn clean install -B -pl debezium-connector-postgres -am -P${{ matrix.postgres-plugin }} -Dformat.formatter.goal=validate -Dformat.imports.goal=check -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn run: mvn clean install -B -pl debezium-connector-postgres -am -P${{ matrix.postgres-plugin }} -Ddebezium.test.records.waittime=5 -Dformat.formatter.goal=validate -Dformat.imports.goal=check -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn

View File

@ -1686,7 +1686,7 @@ public void testCustomSnapshotterSnapshotCompleteLifecycleHook() throws Exceptio
} }
return ret; return ret;
}); });
assertEquals(snapshotCompleteState, Collections.singletonList("complete")); assertEquals(Collections.singletonList("complete"), snapshotCompleteState);
} }
} }

View File

@ -1038,12 +1038,8 @@ public static void waitForSnapshotToBeCompleted(String connector, String server)
.pollInterval(100, TimeUnit.MILLISECONDS) .pollInterval(100, TimeUnit.MILLISECONDS)
.atMost(waitTimeForRecords() * 30, TimeUnit.SECONDS) .atMost(waitTimeForRecords() * 30, TimeUnit.SECONDS)
.ignoreException(InstanceNotFoundException.class) .ignoreException(InstanceNotFoundException.class)
.until(() -> { .until(() -> (boolean) mbeanServer
boolean snapshotCompleted = (boolean) mbeanServer .getAttribute(getSnapshotMetricsObjectName(connector, server), "SnapshotCompleted"));
.getAttribute(getSnapshotMetricsObjectName(connector, server), "SnapshotCompleted");
return snapshotCompleted;
});
} }
public static void waitForStreamingRunning(String connector, String server) throws InterruptedException { public static void waitForStreamingRunning(String connector, String server) throws InterruptedException {