Skip to content

Commit

Permalink
Merge pull request #1282 from data-integrations/ut_fix
Browse files Browse the repository at this point in the history
[PLUGIN-1672] Fixed unit tests failures
  • Loading branch information
itsankit-google authored Aug 28, 2023
2 parents 698be58 + 6d56d7c commit 87cce89
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ public void verifyTheBigQueryValidationErrorMessageForInvalidProperty(String pro
} else if (property.equalsIgnoreCase("bucket")) {
expectedErrorMessage = PluginPropertyUtils
.errorProp(E2ETestConstants.ERROR_MSG_BQ_INCORRECT_TEMPORARY_BUCKET);
} else if (property.equalsIgnoreCase("table")) {
expectedErrorMessage = PluginPropertyUtils
.errorProp(E2ETestConstants.ERROR_MSG_INCORRECT_TABLE_NAME);
} else {
expectedErrorMessage = PluginPropertyUtils.errorProp(E2ETestConstants.ERROR_MSG_BQ_INCORRECT_PROPERTY).
replaceAll("PROPERTY", property.substring(0, 1).toUpperCase() + property.substring(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class E2ETestConstants {
public static final String ERROR_MSG_GCS_INVALID_PATH = "errorMessageGCSInvalidPath";
public static final String ERROR_MSG_GCS_INVALID_BUCKET_NAME = "errorMessageGCSInvalidBucketName";
public static final String ERROR_MSG_INCORRECT_TABLE = "errorMessageIncorrectBQTable";
public static final String ERROR_MSG_INCORRECT_TABLE_NAME = "errorMessageIncorrectBQTableName";
public static final String ERROR_MSG_PUBSUB_INVALID_ADVANCED_FIELDS = "errorMessagePubSubInvalidAdvancedField";
public static final String ERROR_MSG_PUBSUB_MAX_BATCH_COUNT = "errorMessagePubSubMaxBatchCountField";
public static final String ERROR_MSG_PUBSUB_MAX_BATCH_SIZE = "errorMessagePubSubMaxBatchSizeField";
Expand Down
1 change: 1 addition & 0 deletions src/e2e-test/resources/errorMessage.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ errorMessagePubSubRetryTimeout=Invalid max retry timeout for retrying failed pub
errorMessagePubSubErrorThreshold=Invalid error threshold for publishing. Ensure the value is a positive number.
errorMessageIncorrectBQChunkSize=Value must be a multiple of 262144.
errorMessageIncorrectBQBucketName=Bucket name can only contain lowercase letters, numbers, '.', '_', and '-'.
errorMessageIncorrectBQTableName=Table name can only contain letters (lower or uppercase), numbers, '_' and '-'.
errorMessageIncorrectBQProperty=PROPERTY name can only contain letters (lower or uppercase), numbers and '_'.
errorMessageInvalidPath=Error when trying to detect schema: Input path not found
errorMessageBQExecuteTableDataset=Dataset and table must be specified together.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void testValidateTable() {
.setReferenceName("test").build();
try {
dataplexBatchSourceConfig.validateBigQueryDataset(mockFailureCollector,
"project", "dataset", "table-wrong");
"project", "dataset", "table.wrong");
} catch (Exception e) {
}

Expand Down

0 comments on commit 87cce89

Please sign in to comment.