Skip to content

Commit

Permalink
Revert "Revert "Improve DAT: Random namespace to avoid namespace coll…
Browse files Browse the repository at this point in the history
…ision. (#29652)""

This reverts commit da030a2.
  • Loading branch information
edgao committed Aug 22, 2023
1 parent 7a70134 commit ec430ac
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1082,12 +1082,13 @@ public void testNamespaces(final String testCaseId,
DataArgumentsProvider.NAMESPACE_CONFIG.getMessageFileVersion(getProtocolVersion())).lines()
.map(record -> Jsons.deserialize(record, AirbyteMessage.class))
.collect(Collectors.toList());
final List<AirbyteMessage> messagesWithNewNamespace = getRecordMessagesWithNewNamespace(
messages, namespace);
final List<AirbyteMessage> messagesWithNewNamespace = getRecordMessagesWithNewNamespace(messages, namespace);

final JsonNode config = getConfig();
try {
runSyncAndVerifyStateOutput(config, messagesWithNewNamespace, configuredCatalog, false);
// Add to the list of schemas to clean up.
TEST_SCHEMAS.add(namespace);
} catch (final Exception e) {
throw new IOException(String.format(
"[Test Case %s] Destination failed to sync data to namespace %s, see \"namespace_test_cases.json for details\"",
Expand Down Expand Up @@ -1805,7 +1806,8 @@ public Stream<? extends Arguments> provideArguments(final ExtensionContext conte
.filter(testCase -> testCase.get("enabled").asBoolean())
.map(testCase -> Arguments.of(
testCase.get("id").asText(),
testCase.get("namespace").asText(),
// Randomise namespace to avoid collisions between tests.
Strings.addRandomSuffix(testCase.get("namespace").asText(), "", 5),
testCase.get("normalized").asText()));
}

Expand Down

0 comments on commit ec430ac

Please sign in to comment.