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 2020/04/29 16:03:50 UTC

[GitHub] [shardingsphere] kimmking opened a new pull request #5388: add test case for batch insert

kimmking opened a new pull request #5388:
URL: https://github.com/apache/shardingsphere/pull/5388


   
   Changes proposed in this pull request:
   - add test case for batch insert
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] coveralls commented on pull request #5388: add test case for batch insert

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #5388:
URL: https://github.com/apache/shardingsphere/pull/5388#issuecomment-621627917


   ## Pull Request Test Coverage Report for [Build 11367](https://coveralls.io/builds/30453169)
   
   * **0** of **0**   changed or added relevant lines in **0** files are covered.
   * **5** unchanged lines in **1** file lost coverage.
   * Overall coverage increased (+**0.002%**) to **57.53%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/algorithm/sharding/inline/InlineShardingAlgorithm.java](https://coveralls.io/builds/30453169/source?filename=sharding-core%2Fsharding-core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fcore%2Fstrategy%2Falgorithm%2Fsharding%2Finline%2FInlineShardingAlgorithm.java#L55) | 5 | 58.82% |
   <!-- | **Total:** | **5** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/30453169/badge)](https://coveralls.io/builds/30453169) |
   | :-- | --: |
   | Change from base [Build 11349](https://coveralls.io/builds/30426921): |  0.002% |
   | Covered Lines: | 11919 |
   | Relevant Lines: | 20718 |
   
   ---
   ##### 💛  - [Coveralls](https://coveralls.io)
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] codecov-io commented on pull request #5388: add test case for batch insert

Posted by GitBox <gi...@apache.org>.
codecov-io commented on pull request #5388:
URL: https://github.com/apache/shardingsphere/pull/5388#issuecomment-621626640


   # [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=h1) Report
   > Merging [#5388](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere/commit/257e76525031232fc32e3862dc820e0146f1923e&el=desc) will **increase** coverage by `0.00%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere/pull/5388/graphs/tree.svg?width=650&height=150&src=pr&token=ZvlXpWa7so)](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=tree)
   
   ```diff
   @@            Coverage Diff            @@
   ##             master    #5388   +/-   ##
   =========================================
     Coverage     54.02%   54.02%           
     Complexity      412      412           
   =========================================
     Files          1150     1150           
     Lines         20717    20718    +1     
     Branches       3754     3754           
   =========================================
   + Hits          11192    11193    +1     
     Misses         8812     8812           
     Partials        713      713           
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...rithm/sharding/inline/InlineShardingAlgorithm.java](https://codecov.io/gh/apache/shardingsphere/pull/5388/diff?src=pr&el=tree#diff-c2hhcmRpbmctY29yZS9zaGFyZGluZy1jb3JlLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvY29yZS9zdHJhdGVneS9hbGdvcml0aG0vc2hhcmRpbmcvaW5saW5lL0lubGluZVNoYXJkaW5nQWxnb3JpdGhtLmphdmE=) | `58.82% <0.00%> (+2.57%)` | `1.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=continue).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=footer). Last update [257e765...dc9a342](https://codecov.io/gh/apache/shardingsphere/pull/5388?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on a change in pull request #5388: add test case for batch insert

Posted by GitBox <gi...@apache.org>.
terrymanu commented on a change in pull request #5388:
URL: https://github.com/apache/shardingsphere/pull/5388#discussion_r417741512



##########
File path: sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShardingPreparedStatementTest.java
##########
@@ -33,6 +34,10 @@
 import static org.junit.Assert.assertTrue;
 
 public final class ShardingPreparedStatementTest extends AbstractShardingJDBCDatabaseAndTableTest {
+
+    private static final String INSERT_MULTI_VALUES_WITH_GENERATE_SHARDING_KEY_SQL = "INSERT INTO t_user (name) VALUES (?),(?),(?),(?)";
+
+    private static final String SELECT_FOR_INSERT_MULTI_VALUES_WITH_GENERATE_SHARDING_KEY_SQL = "select name from t_user where id=%d";

Review comment:
       It is better if use upper case for keyword in SQL

##########
File path: sharding-jdbc/sharding-jdbc-core/src/test/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/statement/ShardingPreparedStatementTest.java
##########
@@ -77,13 +82,130 @@ public void assertAddBatch() throws SQLException {
             }
         }
     }
+
+    // FIXME Batch Insert @Test

Review comment:
       It is better to use @Ignore




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org