(Abandoned) Please go to #2970 PR.#2832
(Abandoned) Please go to #2970 PR.#2832743294668 wants to merge 3 commits intoapache:devfrom 743294668:Thomas
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #2832 +/- ##
============================================
+ Coverage 37.19% 37.35% +0.16%
- Complexity 2559 2576 +17
============================================
Files 435 435
Lines 20020 20022 +2
Branches 2426 2425 -1
============================================
+ Hits 7447 7480 +33
+ Misses 11907 11858 -49
- Partials 666 684 +18
Continue to review full report at Codecov.
|
|
Kudos, SonarCloud Quality Gate passed!
|
gabry-lab
left a comment
There was a problem hiding this comment.
It's better not to change the scope of appendDatabase. You can override the getJdbcUrl directly
At first I did getJdbcUrl modified, and then I noticed #2812 modification, I made changes based on this basis, and covered appendDatabase. |
Oh dev-1.3.0 branch the getJdbcUrl method removed, maybe we should invite @lgcareer to review this PR |
|
@lgcareer can you help review this? Thank you. Please explain if there is any problem. |
|
You can test use "/" before sid,such as jdbc:oracle:thin:@//:1521/SID,I think we didn't must use ":" before sid. |
Regarding the format of the URL, I am pretty sure that I will list it again. Before submitting this code, I used the local mode to run the API module test. Only the above three methods can pass. Regarding the question you mentioned, I conducted a query on Google again, and I did not find this way of using "/" to connect sid. It may be that the author's sid and service_name have the same name. |
If you test it and it can't work successful,I think you can use your code instead of I said,May be you are right,The last time I test successful is that the service_name and SID is consistent. |
|
@gabrywu can you help review this? Thank you. Now I don’t know who I should check with, because I see that you did a requested changes. |
lgcareer has reviewed the code, this method is no problem. The restriction also requires you to modify and review it, thank you |
done. thanks for your contribution |
|
@743294668 Because the original branch of your repo , this PR can't be merged , so could you create another branch and PR to resolve this ? |
Thanks for your reminder. I resubmitted a PR at #2970. |
merged |

What is the purpose of the pull request
This pull request modify the JDBC format of the Oracle database connection.
Number:#2791.
pull/2792 ,pull/2818has been abandoned for other reasons.
The Oracle JDBC link I verified currently supports the following three methods:
jdbc:oracle:thin:@host:port:SID
jdbc:oracle:thin:@//host:port/service_name
jdbc:oracle:thin:@host:port/service_name
The above three methods are verified in the unit test.
Brief change log
DataSourceService.java:
Add Oracle link type parameter in buildParameter().
BaseDataSource.java:
Modify appendDatabase () method as a protected modifier to facilitate OracleDataSource to rewrite this method.
OracleDataSource.java:
Override appendDatabase () method.
OracleDataSourceTest.java:
Unit test the newly modified code.
DataSourceServiceTest.java:
Add buildParameter () unit test.
pom.xml:
added a line in the maven-surefire-plugin section of the pom file to ensure that my OracleDataSourceTest.java file can be executed, thus ensuring my code coverage.
Verify this pull request
This change added tests and can be verified as follows:
Add the Oracle data source in the data source center, including using the service name or SID.
Perform the task of executing the Oracle data source on the SQL type node and pass the verification.
##Addition
If anything is wrong, you are welcome to participate in the discussion. Thanks.