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/03/12 14:39:36 UTC

[GitHub] [shardingsphere] sandynz commented on pull request #16011: Added unit test for PipelineSimpleLock

sandynz commented on pull request #16011:
URL: https://github.com/apache/shardingsphere/pull/16011#issuecomment-1065894588


   Hi @shreya024 , thanks for your contribution, but I found there's some CI didn't pass.
   e.g.
   In https://github.com/apache/shardingsphere/runs/5512740096?check_suite_focus=true
   ```
   Error:  assertReleaseLock(org.apache.shardingsphere.data.pipeline.core.lock.PipelineSimpleLockTest)  Time elapsed: 0.031 s  <<< ERROR!
   java.lang.RuntimeException: Could not get metadata persist service
   	at org.apache.shardingsphere.data.pipeline.core.lock.PipelineSimpleLockTest.setUp(PipelineSimpleLockTest.java:39)
   ```
   
   From `PipelineSimpleLock` source code:
   ```
       private PipelineSimpleLock() {
           Optional<MetaDataPersistService> persistServiceOptional = PipelineContext.getContextManager().getMetaDataContexts().getMetaDataPersistService();
           persistServiceOptional.orElseThrow(() -> new RuntimeException("Could not get metadata persist service"));
   ...
   ```
   We need to prepare `MetaDataPersistService` before `PipelineSimpleLock.getInstance()` invocation. You could reference `LockRegistryServiceTest` and `PipelineContextUtil`.
   
   And you could run unit test for `shardingsphere-pipeline-test` module before push new commit, it's more effective to get unit test result than running on GitHub CI.
   
   Feel free to leave comments on this PR if you have any question.
   


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