From 460b58bdc9f0fc943374534c722c8fee5c13cd84 Mon Sep 17 00:00:00 2001 From: Joe Bell Date: Wed, 21 Dec 2022 14:16:23 -0800 Subject: [PATCH 1/2] add randomization to namespace testing --- .../standardtest/destination/DestinationAcceptanceTest.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java b/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java index 23703a3d47dd..a1c07923b196 100644 --- a/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java +++ b/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java @@ -23,6 +23,7 @@ import io.airbyte.commons.json.Jsons; import io.airbyte.commons.lang.Exceptions; import io.airbyte.commons.resources.MoreResources; +import io.airbyte.commons.string.Strings; import io.airbyte.commons.util.MoreIterators; import io.airbyte.config.EnvConfigs; import io.airbyte.config.JobGetSpecConfig; @@ -986,7 +987,9 @@ void testSyncUsesAirbyteStreamNamespaceIfNotNull() throws Exception { Jsons.deserialize( MoreResources.readResource(DataArgumentsProvider.EXCHANGE_RATE_CONFIG.getCatalogFileVersion(getProtocolVersion())), AirbyteCatalog.class); - final String namespace = "sourcenamespace"; + // A randomized namespace is required otherwise you can generate a "false success" with data from a previous run. + final String namespace = Strings.addRandomSuffix("airbyte_source_namespace", "_", 8); + catalog.getStreams().forEach(stream -> stream.setNamespace(namespace)); final ConfiguredAirbyteCatalog configuredCatalog = CatalogHelpers.toDefaultConfiguredCatalog( catalog); From a629f88bd7ae0258d1c4075b307ff9d6f9ca00d4 Mon Sep 17 00:00:00 2001 From: Joe Bell Date: Wed, 21 Dec 2022 16:44:17 -0800 Subject: [PATCH 2/2] formatting --- .../standardtest/destination/DestinationAcceptanceTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java b/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java index a1c07923b196..8cc4237f27a2 100644 --- a/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java +++ b/airbyte-integrations/bases/standard-destination-test/src/main/java/io/airbyte/integrations/standardtest/destination/DestinationAcceptanceTest.java @@ -987,7 +987,8 @@ void testSyncUsesAirbyteStreamNamespaceIfNotNull() throws Exception { Jsons.deserialize( MoreResources.readResource(DataArgumentsProvider.EXCHANGE_RATE_CONFIG.getCatalogFileVersion(getProtocolVersion())), AirbyteCatalog.class); - // A randomized namespace is required otherwise you can generate a "false success" with data from a previous run. + // A randomized namespace is required otherwise you can generate a "false success" with data from a + // previous run. final String namespace = Strings.addRandomSuffix("airbyte_source_namespace", "_", 8); catalog.getStreams().forEach(stream -> stream.setNamespace(namespace));