Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e_oracle replication tests #121

Merged
merged 1 commit into from
Sep 5, 2023

Conversation

itsmekumari
Copy link
Contributor

e2e_oracle replication tests

When Enter input plugin property: "name" with pipelineName
And Click on the "Next" button in replication to navigate
And Select Source plugin: "Oracle" from the replication plugins list
Then Select radio button plugin property: "connectivityMethod" with value: "private-connectivity"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Use camel case for variable 'private-connectivity'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is the value to be selected.

Then Replace input plugin property: "port" with value: "oraclePort" for Credentials and Authorization related fields
Then Replace input plugin property: "sid" with value: "oracleDatabaseName"
Then Replace input plugin property: "user" with value: "oracleUsername" for Credentials and Authorization related fields
Then Click on the Macro button of Property: "password" and set the value to: "Password"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: 'Password' -> 'oraclePassword' like in other cases

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change done.

Then Close the replication pipeline logs and stop the pipeline

@ORACLE_SOURCE_TEST @ORACLE_DELETE_TEST @BIGQUERY_DELETE @Required
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be in caps as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to caps.

Copy link
Contributor

@yjhawar yjhawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, few minor comments

Assert.assertNotNull(logs);
PageHelper.closeCurrentWindow();
return logs;
ElementHelper.clickOnElement(CdfPluginPropertiesLocators.selectReplicationTable(table),300);
}

public static void waitTillPipelineIsRunningAndCheckForErrors() throws InterruptedException {
//wait for datastream to startup
int defaultTimeout = Integer.parseInt(PluginPropertyUtils.pluginProp("pipeline-initialization"));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: variable in camelCase

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change done.

oracleUsername=ORACLE_USERNAME
oraclePassword=ORACLE_PASSWORD
privateConnectionName=ghsubnet

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: remove blank line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

}

public static void verifyTargetBigQueryRecordMatchesExpectedOracleRecord()
throws IOException, InterruptedException, SQLException, ClassNotFoundException {
// Checking if an error message is displayed.
Assert.assertFalse(ElementHelper.isElementDisplayed(ReplicationLocators.error));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:remove this blank line

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

Assert.assertNotNull(logs);
PageHelper.closeCurrentWindow();
return logs;
ElementHelper.clickOnElement(CdfPluginPropertiesLocators.selectReplicationTable(table),300);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: wait time can be shorter here, I think 180 seconds should be good enough.what do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, changed to 180 seconds.

@yjhawar yjhawar removed the request for review from sumitjnn August 25, 2023 12:12
public void captureRawLogs() {
ReplicationActions.captureRawLog();
}

@And("Run insert, update and delete CDC events on source table")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

except for this, all are common steps that are used in all sources.Can you place in common stepsdesign?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, we need the schema name, database name which differ for source plugins table creation and are mentioned and used from pluginParameter file for pipeline initialization. All the other common replication steps are already placed and used from cdap e2e. https://docs.google.com/document/d/1MXdQujYAzmBmZBGxrCjGPRHbAuhzOT3TXR9DOoqLRGA/edit?resourcekey=0-JpDyJhg4BnXXhMJ8fNF7dw

@yjhawar yjhawar self-requested a review August 25, 2023 12:52
Copy link
Contributor

@yjhawar yjhawar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

passed another comment.Resolve it before submitting

@yjhawar yjhawar merged commit 636d70f into data-integrations:develop Sep 5, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants