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 leaf snowflake key generator and related functions. #2828

Merged
merged 25 commits into from
Aug 23, 2019
Merged

Add leaf snowflake key generator and related functions. #2828

merged 25 commits into from
Aug 23, 2019

Conversation

wgy8283335
Copy link
Contributor

Changes proposed in this pull request:

Add LeafSnowflakeKeyGenerator class and TimeService class.
Add LeafSnowflakeKeyGeneratorTest class and FixedTimeService class.

@terrymanu terrymanu requested a review from tristaZero August 8, 2019 09:36
@wgy8283335
Copy link
Contributor Author

@tristaZero.During CI building, the error happened with message "The command "travis_wait 30 mvn install --quiet" failed and exited with 137 during ." Is there anything wrong in the Travis CI system?

@sunbufu
Copy link
Contributor

sunbufu commented Aug 10, 2019

Still running (30 of 30): mvn install --quiet
Timeout (30 minutes) reached. Terminating "mvn install --quiet"

It looks like CI check timed out. I think you should try it again.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 9126

  • 120 of 132 (90.91%) changed or added relevant lines in 2 files are covered.
  • 146 unchanged lines in 7 files lost coverage.
  • Overall coverage increased (+0.2%) to 64.311%

Changes Missing Coverage Covered Lines Changed/Added Lines %
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/keygen/LeafSnowflakeKeyGenerator.java 119 131 90.84%
Files with Coverage Reduction New Missed Lines %
sharding-orchestration/sharding-orchestration-core/src/main/java/org/apache/shardingsphere/orchestration/internal/util/IpUtils.java 3 76.0%
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/strategy/encrypt/EncryptTable.java 4 0.0%
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/adapter/AbstractResultSetAdapter.java 9 82.0%
sharding-core/sharding-core-common/src/main/java/org/apache/shardingsphere/core/rule/EncryptRule.java 14 6.17%
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/resultset/EncryptResultSetMetaData.java 21 45.0%
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/resultset/ShardingResultSetMetaData.java 33 0.0%
sharding-jdbc/sharding-jdbc-core/src/main/java/org/apache/shardingsphere/shardingjdbc/jdbc/core/resultset/EncryptResultSet.java 62 28.57%
Totals Coverage Status
Change from base Build 223: 0.2%
Covered Lines: 9174
Relevant Lines: 14265

💛 - Coveralls

int taskNumber = threadNumber << 2;
for (int i = 0; i < taskNumber; i++) {
actual.add(executor.submit(new Callable<Comparable<?>>() {
@Override
Copy link
Contributor

Choose a reason for hiding this comment

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

Add blank line

@@ -142,12 +138,11 @@ public void assertGenerateKeyWithDefaultStep() {
}
}).get());
}
assertThat(actual.size(), is(taskNumber));
assertThat(actual.size(), CoreMatchers.is(taskNumber));
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use import static if you want to use is() for asserting.

@terrymanu terrymanu added this to the 4.0.0-RC3 milestone Aug 23, 2019
@terrymanu terrymanu merged commit 228e302 into apache:dev Aug 23, 2019
terrymanu added a commit that referenced this pull request Aug 23, 2019
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.

5 participants