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/10/16 14:29:28 UTC

[GitHub] [shardingsphere-elasticjob] wwj-go opened a new pull request #1565: Add test case for ElasticJobListenerFactory (#1564).

wwj-go opened a new pull request #1565:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1565


   
   Fixes #1564.
   
   Changes proposed in this pull request:
   - Add test case for ElasticJobListenerFactory (#1564).
   - Correct a document problem.
   


----------------------------------------------------------------
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-elasticjob] Technoboy- merged pull request #1565: Add test case for ElasticJobListenerFactory (#1564).

Posted by GitBox <gi...@apache.org>.
Technoboy- merged pull request #1565:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1565


   


----------------------------------------------------------------
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-elasticjob] codecov-io commented on pull request #1565: Add test case for ElasticJobListenerFactory (#1564).

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


   # [Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?src=pr&el=h1) Report
   > Merging [#1565](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?src=pr&el=desc) into [master](https://codecov.io/gh/apache/shardingsphere-elasticjob/commit/67bafbe644b63fc38a272c67fa46769a693b7438?el=desc) will **increase** coverage by `0.14%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565/graphs/tree.svg?width=650&height=150&src=pr&token=8ZMVc4Yo4Z)](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?src=pr&el=tree)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1565      +/-   ##
   ============================================
   + Coverage     85.26%   85.41%   +0.14%     
     Complexity      103      103              
   ============================================
     Files           250      250              
     Lines          5689     5689              
     Branches        882      882              
   ============================================
   + Hits           4851     4859       +8     
   + Misses          523      515       -8     
     Partials        315      315              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
   |---|---|---|---|
   | [...ticjob/lite/internal/snapshot/SnapshotService.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1saXRlL2VsYXN0aWNqb2ItbGl0ZS1jb3JlL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9zaGFyZGluZ3NwaGVyZS9lbGFzdGljam9iL2xpdGUvaW50ZXJuYWwvc25hcHNob3QvU25hcHNob3RTZXJ2aWNlLmphdmE=) | `82.53% <0.00%> (+1.58%)` | `1.00% <0.00%> (ø%)` | |
   | [.../elasticjob/infra/spi/ElasticJobServiceLoader.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9zcGkvRWxhc3RpY0pvYlNlcnZpY2VMb2FkZXIuamF2YQ==) | `46.87% <0.00%> (+12.50%)` | `0.00% <0.00%> (ø%)` | |
   | [...cjob/infra/listener/ElasticJobListenerFactory.java](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565/diff?src=pr&el=tree#diff-ZWxhc3RpY2pvYi1pbmZyYS9lbGFzdGljam9iLWluZnJhLWNvbW1vbi9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvc2hhcmRpbmdzcGhlcmUvZWxhc3RpY2pvYi9pbmZyYS9saXN0ZW5lci9FbGFzdGljSm9iTGlzdGVuZXJGYWN0b3J5LmphdmE=) | `100.00% <0.00%> (+100.00%)` | `0.00% <0.00%> (ø%)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?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-elasticjob/pull/1565?src=pr&el=footer). Last update [67bafbe...ab8d744](https://codecov.io/gh/apache/shardingsphere-elasticjob/pull/1565?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-elasticjob] TeslaCN commented on a change in pull request #1565: Add test case for ElasticJobListenerFactory (#1564).

Posted by GitBox <gi...@apache.org>.
TeslaCN commented on a change in pull request #1565:
URL: https://github.com/apache/shardingsphere-elasticjob/pull/1565#discussion_r506575780



##########
File path: elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/listener/fixture/FooElasticJobListener.java
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.elasticjob.infra.listener.fixture;
+
+import org.apache.shardingsphere.elasticjob.infra.listener.ElasticJobListener;
+import org.apache.shardingsphere.elasticjob.infra.listener.ShardingContexts;
+
+public class FooElasticJobListener implements ElasticJobListener {
+    @Override

Review comment:
       Keep one blank line after class definition.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/

##########
File path: elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/listener/fixture/FooElasticJobListener.java
##########
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.elasticjob.infra.listener.fixture;
+
+import org.apache.shardingsphere.elasticjob.infra.listener.ElasticJobListener;
+import org.apache.shardingsphere.elasticjob.infra.listener.ShardingContexts;
+
+public class FooElasticJobListener implements ElasticJobListener {

Review comment:
       Design class as final class except abstract class for extend.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/

##########
File path: elasticjob-infra/elasticjob-infra-common/src/test/java/org/apache/shardingsphere/elasticjob/infra/listener/ElasticJobListenerFactoryTest.java
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shardingsphere.elasticjob.infra.listener;
+
+import org.apache.shardingsphere.elasticjob.infra.exception.JobConfigurationException;
+import org.apache.shardingsphere.elasticjob.infra.listener.fixture.FooElasticJobListener;
+import org.junit.Test;
+
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.junit.Assert.assertThat;
+
+public class ElasticJobListenerFactoryTest {

Review comment:
       Design class as final class except abstract class for extend.
   Ref https://shardingsphere.apache.org/community/en/contribute/code-conduct/




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