Skip to content

Commit 87cce89

Browse files
Merge pull request #1282 from data-integrations/ut_fix
[PLUGIN-1672] Fixed unit tests failures
2 parents 698be58 + 6d56d7c commit 87cce89

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/e2e-test/java/io/cdap/plugin/bigquery/stepsdesign/BigQueryBase.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ public void verifyTheBigQueryValidationErrorMessageForInvalidProperty(String pro
234234
} else if (property.equalsIgnoreCase("bucket")) {
235235
expectedErrorMessage = PluginPropertyUtils
236236
.errorProp(E2ETestConstants.ERROR_MSG_BQ_INCORRECT_TEMPORARY_BUCKET);
237+
} else if (property.equalsIgnoreCase("table")) {
238+
expectedErrorMessage = PluginPropertyUtils
239+
.errorProp(E2ETestConstants.ERROR_MSG_INCORRECT_TABLE_NAME);
237240
} else {
238241
expectedErrorMessage = PluginPropertyUtils.errorProp(E2ETestConstants.ERROR_MSG_BQ_INCORRECT_PROPERTY).
239242
replaceAll("PROPERTY", property.substring(0, 1).toUpperCase() + property.substring(1));

src/e2e-test/java/io/cdap/plugin/utils/E2ETestConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public class E2ETestConstants {
77
public static final String ERROR_MSG_GCS_INVALID_PATH = "errorMessageGCSInvalidPath";
88
public static final String ERROR_MSG_GCS_INVALID_BUCKET_NAME = "errorMessageGCSInvalidBucketName";
99
public static final String ERROR_MSG_INCORRECT_TABLE = "errorMessageIncorrectBQTable";
10+
public static final String ERROR_MSG_INCORRECT_TABLE_NAME = "errorMessageIncorrectBQTableName";
1011
public static final String ERROR_MSG_PUBSUB_INVALID_ADVANCED_FIELDS = "errorMessagePubSubInvalidAdvancedField";
1112
public static final String ERROR_MSG_PUBSUB_MAX_BATCH_COUNT = "errorMessagePubSubMaxBatchCountField";
1213
public static final String ERROR_MSG_PUBSUB_MAX_BATCH_SIZE = "errorMessagePubSubMaxBatchSizeField";

src/e2e-test/resources/errorMessage.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ errorMessagePubSubRetryTimeout=Invalid max retry timeout for retrying failed pub
1515
errorMessagePubSubErrorThreshold=Invalid error threshold for publishing. Ensure the value is a positive number.
1616
errorMessageIncorrectBQChunkSize=Value must be a multiple of 262144.
1717
errorMessageIncorrectBQBucketName=Bucket name can only contain lowercase letters, numbers, '.', '_', and '-'.
18+
errorMessageIncorrectBQTableName=Table name can only contain letters (lower or uppercase), numbers, '_' and '-'.
1819
errorMessageIncorrectBQProperty=PROPERTY name can only contain letters (lower or uppercase), numbers and '_'.
1920
errorMessageInvalidPath=Error when trying to detect schema: Input path not found
2021
errorMessageBQExecuteTableDataset=Dataset and table must be specified together.

src/test/java/io/cdap/plugin/gcp/dataplex/source/config/DataplexBatchSourceConfigTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void testValidateTable() {
129129
.setReferenceName("test").build();
130130
try {
131131
dataplexBatchSourceConfig.validateBigQueryDataset(mockFailureCollector,
132-
"project", "dataset", "table-wrong");
132+
"project", "dataset", "table.wrong");
133133
} catch (Exception e) {
134134
}
135135

0 commit comments

Comments
 (0)