Skip to content

Commit

Permalink
Change livecycle from Class to method, so the resources are not share…
Browse files Browse the repository at this point in the history
…d between tests (#24064)

* Change livecycle from Class to method, so the resources are not shared between tests.

* Per method is the default value

* fix gradle

* Make sure everything is cleaned after each test

* Bump Bigquery that includes INTERVAL type

* Comment incremental test for bigquery due to error in the state message format

* Add disabling reason
  • Loading branch information
sergio-ropero authored and erohmensing committed Mar 22, 2023
1 parent b0ed92d commit 3b6da50
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ acceptance_tests:
tests:
- config_path: "secrets/sat-config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
incremental:
tests:
- config_path: "secrets/sat-config.json"
configured_catalog_path: "integration_tests/configured_catalog_inc.json"
# DISABLED DUE TO ISSUE WITH DB STATES NOT MATCHING ACCEPTANCE TESTS EXPECTATIONS (wrong key-values)
# incremental:
# tests:
# - config_path: "secrets/sat-config.json"
# configured_catalog_path: "integration_tests/configured_catalog_inc.json"
3 changes: 2 additions & 1 deletion airbyte-integrations/connectors/source-bigquery/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ application {
}

dependencies {
implementation 'com.google.cloud:google-cloud-bigquery:2.10.1'
implementation 'com.google.cloud:google-cloud-bigquery:2.23.2'
implementation 'org.apache.commons:commons-lang3:3.11'
implementation project(':airbyte-db:db-lib')
implementation project(':airbyte-integrations:bases:base-java')
Expand All @@ -29,3 +29,4 @@ dependencies {
implementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
integrationTestJavaImplementation files(project(':airbyte-integrations:bases:base-java').airbyteDocker.outputs)
}

Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@
import io.airbyte.protocol.models.JsonSchemaType;
import java.nio.file.Files;
import java.nio.file.Path;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.TestInstance;
import org.junit.jupiter.api.TestInstance.Lifecycle;
import org.junit.jupiter.api.AfterEach;

@TestInstance(Lifecycle.PER_CLASS)
public class BigQuerySourceDatatypeTest extends AbstractSourceDatabaseTypeTest {

private static final Path CREDENTIALS_PATH = Path.of("secrets/credentials.json");
Expand All @@ -42,12 +39,12 @@ protected String getImageName() {
}

@Override
protected JsonNode getConfig() throws Exception {
protected JsonNode getConfig() {
return config;
}

@Override
protected void tearDown(final TestDestinationEnv testEnv) throws Exception {
protected void tearDown(final TestDestinationEnv testEnv) {

}

Expand Down Expand Up @@ -344,7 +341,7 @@ protected String getValueFromJsonNode(final JsonNode jsonNode) {
return null;
}

@AfterAll
@AfterEach
public void cleanTestInstance() {
database.getRealDatabase().cleanDataSet(getNameSpace());
}
Expand Down

0 comments on commit 3b6da50

Please sign in to comment.