You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/09/04 19:20:25 UTC
[GitHub] [shardingsphere] abhinav-koppula opened a new pull request, #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
abhinav-koppula opened a new pull request, #20778:
URL: https://github.com/apache/shardingsphere/pull/20778
Fixes #19262 .
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] codecov-commenter commented on pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#issuecomment-1236405955
# [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/20778?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#20778](https://codecov.io/gh/apache/shardingsphere/pull/20778?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8c514a1) into [master](https://codecov.io/gh/apache/shardingsphere/commit/769ff9079b79e67030f68d52222de6305cfaab7c?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (769ff90) will **decrease** coverage by `0.00%`.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #20778 +/- ##
============================================
- Coverage 61.31% 61.31% -0.01%
Complexity 2419 2419
============================================
Files 3983 3983
Lines 55231 55231
Branches 9373 9373
============================================
- Hits 33866 33864 -2
- Misses 18482 18485 +3
+ Partials 2883 2882 -1
```
| [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/20778?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...handler/distsql/ral/hint/enums/HintSourceType.java](https://codecov.io/gh/apache/shardingsphere/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtcHJveHkvc2hhcmRpbmdzcGhlcmUtcHJveHktYmFja2VuZC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvcHJveHkvYmFja2VuZC9oYW5kbGVyL2Rpc3RzcWwvcmFsL2hpbnQvZW51bXMvSGludFNvdXJjZVR5cGUuamF2YQ==) | `0.00% <0.00%> (-42.86%)` | :arrow_down: |
| [...gsphere/mode/metadata/MetaDataContextsFactory.java](https://codecov.io/gh/apache/shardingsphere/pull/20778/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c2hhcmRpbmdzcGhlcmUtbW9kZS9zaGFyZGluZ3NwaGVyZS1tb2RlLWNvcmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL3NoYXJkaW5nc3BoZXJlL21vZGUvbWV0YWRhdGEvTWV0YURhdGFDb250ZXh0c0ZhY3RvcnkuamF2YQ==) | `95.45% <0.00%> (+4.54%)` | :arrow_up: |
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] abhinav-koppula commented on a diff in pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
abhinav-koppula commented on code in PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#discussion_r964714626
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
+
+ @Mock
+ private JDBCInstanceMetaData jdbcInstanceMetaData;
+
+ private final Properties properties = new Properties();
+
+ private final List<ShardingSphereRule> shardingSphereRules = new ArrayList<ShardingSphereRule>() {
+ {
+ add(new MockedRule());
Review Comment:
Moved to setup, https://github.com/apache/shardingsphere/pull/20778/commits/802fc58ebc48f7e41ca1281a3fb7708442be5b32#diff-4d5951cc0f1eb8b3f9a46f67750ce90b78ca6d217d9f8e69c1e35985abf249e3R92
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu merged pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
strongduanmu merged PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] abhinav-koppula commented on pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
abhinav-koppula commented on PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#issuecomment-1239252032
@strongduanmu - Thanks for the review. Rebased the PR and addressed the review comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] abhinav-koppula commented on a diff in pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
abhinav-koppula commented on code in PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#discussion_r964714331
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
+
+ @Mock
+ private JDBCInstanceMetaData jdbcInstanceMetaData;
+
+ private final Properties properties = new Properties();
+
+ private final List<ShardingSphereRule> shardingSphereRules = new ArrayList<ShardingSphereRule>() {
Review Comment:
done, https://github.com/apache/shardingsphere/pull/20778/commits/802fc58ebc48f7e41ca1281a3fb7708442be5b32#diff-4d5951cc0f1eb8b3f9a46f67750ce90b78ca6d217d9f8e69c1e35985abf249e3R82
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on a diff in pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on code in PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#discussion_r964376418
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
Review Comment:
Do you think database is better?
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
+
+ @Mock
+ private JDBCInstanceMetaData jdbcInstanceMetaData;
+
+ private final Properties properties = new Properties();
+
+ private final List<ShardingSphereRule> shardingSphereRules = new ArrayList<ShardingSphereRule>() {
Review Comment:
Please use Collection<ShardingSphereRule> instead of List<ShardingSphereRule>.
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
+
+ @Mock
+ private JDBCInstanceMetaData jdbcInstanceMetaData;
+
+ private final Properties properties = new Properties();
+
+ private final List<ShardingSphereRule> shardingSphereRules = new ArrayList<ShardingSphereRule>() {
+ {
+ add(new MockedRule());
Review Comment:
Please init collection in setUp method.
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
+
+ @Mock
+ private JDBCInstanceMetaData jdbcInstanceMetaData;
+
+ private final Properties properties = new Properties();
+
+ private final List<ShardingSphereRule> shardingSphereRules = new ArrayList<ShardingSphereRule>() {
Review Comment:
Please use new LinkedList if we don't need get element by index.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] abhinav-koppula commented on a diff in pull request #20778: [Issue #19262]-Assertions added for metadata in MetaDataContextsFactory test
Posted by GitBox <gi...@apache.org>.
abhinav-koppula commented on code in PR #20778:
URL: https://github.com/apache/shardingsphere/pull/20778#discussion_r964713737
##########
shardingsphere-mode/shardingsphere-mode-core/src/test/java/org/apache/shardingsphere/mode/metadata/MetaDataContextsFactoryTest.java:
##########
@@ -53,18 +70,57 @@ public final class MetaDataContextsFactoryTest {
@Mock
private DatabaseMetaDataPersistService databaseMetaDataPersistService;
-
+
+ @Mock
+ private ShardingSphereDatabase mockShardingSphereDb;
Review Comment:
Makes sense. done, https://github.com/apache/shardingsphere/pull/20778/commits/802fc58ebc48f7e41ca1281a3fb7708442be5b32#diff-4d5951cc0f1eb8b3f9a46f67750ce90b78ca6d217d9f8e69c1e35985abf249e3R75
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org