Conversation
| # Scenario: Sanity test from Oracle to Big Query | ||
| # Given Open DataFusion Project with replication to configure pipeline | ||
| # When Enter input plugin property: "name" with value: "pipelineName" | ||
| # And Click on the Next button | ||
| # And Select Oracle as Source | ||
| # Then Replace input plugin property: "host" with value: "host" for Credentials and Authorization related fields | ||
| # Then Replace input plugin property: "port" with value: "port" for Credentials and Authorization related fields | ||
| # Then Click plugin property: "region" | ||
| # Then Click plugin property: "regionOption" | ||
| # Then Replace input plugin property: "user" with value: "username" for Credentials and Authorization related fields | ||
| # Then Replace input plugin property: "password" with value: "password" for Credentials and Authorization related fields | ||
| # Then Replace input plugin property: "sid" with value: "database" for Credentials and Authorization related fields | ||
| # Then Click on the Next button | ||
| # Then Replace input plugin property: "loadInterval" with value: "loadInterval" | ||
| # Then Click on the Next button | ||
| # Then Validate Table is available and can be selected "ABC.E2E-sanity" | ||
| # And Click on the Next button | ||
| # And Click on the Next button | ||
| # And Click on the Next button | ||
| # Then Deploy the replication pipeline | ||
| # And Run the replication Pipeline | ||
| # Then Open the logs | ||
| # And Wait till pipeline is in running state and check if no errors occurred | ||
| # Then Verify expected Oracle records in target BigQuery table | ||
| # And Capture raw logs | ||
| # Then Close the pipeline logs and stop the pipeline |
There was a problem hiding this comment.
Will this comment block be removed?
| # And Capture raw logs | ||
| # Then Close the pipeline logs and stop the pipeline | ||
|
|
||
| # @ORACLE_SOURCE |
There was a problem hiding this comment.
What's the significance of this annotation? Why is it commented out?
| # Then Close the pipeline logs and stop the pipeline | ||
|
|
||
| # @ORACLE_SOURCE | ||
| Scenario: To verify snapshot and cdc from Oracle to Big Query successfully |
There was a problem hiding this comment.
| Scenario: To verify snapshot and cdc from Oracle to Big Query successfully | |
| Scenario: To verify replication of snapshot and cdc data from Oracle to Big Query successfully |
| datatypeColumnsForSanityTesting=('USER1', 'M','ABCDEF','ABC','ABC','�','� 好�?�?','� 好�?�?','AAAAaoAATAAABrXAAA',1234,1234.56789,\ | ||
| 1234.56789,1234.56789,1234.56789,1234.56789,1234.56789,1234.56789,1234.5679,\ | ||
| 1234.56789,1234.5679,1234.5679,1234.56789,TIMESTAMP'2023-01-01 2:00:00',TIMESTAMP'2023-01-01 2:00:00',\ | ||
| TIMESTAMP '2023-01-01 00:00:00.000000') | ||
|
|
||
| datatypeValuesForSanityTesting=('USER1', 'M','ABCDEF','ABC','ABC','�','� 好�?�?','� 好�?�?',\ | ||
| 'AAAAaoAATAAABrXAAA',1234,1234.56789,\ | ||
| 1234.56789,1234.56789,1234.56789,1234.56789,1234.56789,1234.56789,1234.5679,\ | ||
| 1234.56789,1234.5679,1234.5679,1234.56789,TIMESTAMP'2023-01-01 2:00:00',TIMESTAMP'2023-01-01 2:00:00',\ | ||
| TIMESTAMP '2023-01-01 00:00:00.000000') No newline at end of file |
There was a problem hiding this comment.
What's the reason for storing these in property file? Are we storing rows and types like this for existing e2e tests?
There was a problem hiding this comment.
Yes.For connectors, it is done this way.
|
|
||
| public static void waitTillPipelineIsRunningAndCheckForErrors() throws InterruptedException { | ||
| //wait for datastream to startup | ||
| int defaultTimeout = Integer.parseInt(PluginPropertyUtils.pluginProp("datastream.timeout")); |
There was a problem hiding this comment.
Rename it to more general term like pipeline initialization time instead of datastream.timeout
| bqRow.remove("_is_deleted"); | ||
| bqRow.remove("_sequence_num"); | ||
|
|
||
| ValidationHelper.compareBothResponses( bqRow, oracleRecord); |
There was a problem hiding this comment.
| ValidationHelper.compareBothResponses( bqRow, oracleRecord); | |
| compareRecords( bqRow, oracleRecord); |
| if (port!= null && !port.isEmpty()) { | ||
| PluginPropertyUtils.addPluginProp("port", port); | ||
| } | ||
| String sapHost = System.getenv("ORACLE_HOST"); |
| @Before(order = 1, value = "@ORACLE_SOURCE") | ||
| public static void overridePropertiesFromEnvVarsIfProvided() { | ||
| String username = System.getenv("ORACLE_USERNAME"); | ||
| if (username != null && !username.isEmpty()) { |
There was a problem hiding this comment.
what happens if property is null?
There was a problem hiding this comment.
test will not run like username is used for creating tables, that will fail thereby ending tests
|
|
||
| @Before(order = 4, value = "@ORACLE_SOURCE") | ||
| public static void getOracleRecordsAsMap() throws SQLException, ClassNotFoundException { | ||
| sourceOracleRecords = OracleClient.getOracleRecordsAsMap(tableName, schemaName); |
There was a problem hiding this comment.
This is for logging expected records before test starts?
|
|
||
| @After(order = 1, value = "@ORACLE_SOURCE_TEMP") | ||
| public static void dropTables() throws SQLException, ClassNotFoundException { | ||
| OracleClient.deleteTables(schemaName, tableName); |
There was a problem hiding this comment.
Should we drop BQ table as well?
There was a problem hiding this comment.
Yes we can. But having target table is good for validation after e2e tests are done
| @@ -0,0 +1,50 @@ | |||
| # | |||
There was a problem hiding this comment.
I think it would be better to rename the file to SanityTests.feature to reflect the intent
No description provided.