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

Add more unit tests for BroadcastSQLRouter (#28521) #29095

Merged
merged 3 commits into from
Dec 4, 2023
Merged

Add more unit tests for BroadcastSQLRouter (#28521) #29095

merged 3 commits into from
Dec 4, 2023

Conversation

TherChenYang
Copy link
Collaborator

@TherChenYang TherChenYang commented Nov 20, 2023

Fixes #28521

Changes proposed in this pull request:

Add more unit tests for BroadcastSQLRouter

Before committing this PR, I'm sure that I have checked the following options:

  • [√ ] My code follows the code of conduct of this project.
  • [√ ] I have self-reviewed the commit code.
  • [√ ] I have (or in comment I request) added corresponding labels for the pull request.
  • [√] I have passed maven check locally : ./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e.
  • I have made corresponding changes to the documentation.
  • I have added corresponding unit tests for my changes.

import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

public class BroadcastSqlRouterTest {
Copy link
Member

Choose a reason for hiding this comment

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

Please remove public modifier in unit test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll fix it right away.

* test For BroadcastSQLRouter.createRouteContext().
*/
@Test
public void assertCreateBroadcastRouteContextWithMultiDataSource() throws SQLException {
Copy link
Member

Choose a reason for hiding this comment

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

Please remove public modifier in unit test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll fix it right away.


public class BroadcastSqlRouterTest {

/**
Copy link
Member

Choose a reason for hiding this comment

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

Please remove javadoc in unit test

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll fix it right away.

@TherChenYang
Copy link
Collaborator Author

@strongduanmu I have adjusted the code according to CR rules,thank you for your CR !

Copy link
Member

@strongduanmu strongduanmu left a comment

Choose a reason for hiding this comment

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

LGTM, merged.

@strongduanmu strongduanmu merged commit 049dc52 into apache:master Dec 4, 2023
15 checks passed
@TherChenYang TherChenYang deleted the 28521 branch December 8, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more unit tests for BroadcastSQLRouter
2 participants