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/03/20 23:31:44 UTC

[GitHub] [incubator-shardingsphere] meAsky opened a new pull request #4873: Test case of ApolloProperties

meAsky opened a new pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873
 
 
   Fixes 4820
   
   Changes proposed in this pull request:
   - Test case of ApolloProperties
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] tristaZero merged pull request #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
tristaZero merged pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873
 
 
   

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] coveralls commented on issue #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873#issuecomment-601971511
 
 
   ## Pull Request Test Coverage Report for [Build 10457](https://coveralls.io/builds/29515022)
   
   * **0** of **0**   changed or added relevant lines in **0** files are covered.
   * **18** unchanged lines in **3** files lost coverage.
   * Overall coverage decreased (**-0.08%**) to **58.477%**
   
   ---
   
   
   |  Files with Coverage Reduction | New Missed Lines | % |
   | :-----|--------------|--: |
   | [sharding-orchestration/sharding-orchestration-core/sharding-orchestration-core-registrycenter/src/main/java/org/apache/shardingsphere/orchestration/core/registrycenter/util/IpUtils.java](https://coveralls.io/builds/29515022/source?filename=sharding-orchestration%2Fsharding-orchestration-core%2Fsharding-orchestration-core-registrycenter%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Forchestration%2Fcore%2Fregistrycenter%2Futil%2FIpUtils.java#L63) | 3 | 76.0% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/synctask/history/HistoryDataSyncTask.java](https://coveralls.io/builds/29515022/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fsynctask%2Fhistory%2FHistoryDataSyncTask.java#L116) | 7 | 76.47% |
   | [sharding-scaling/sharding-scaling-core/src/main/java/org/apache/shardingsphere/shardingscaling/core/execute/executor/channel/MemoryChannel.java](https://coveralls.io/builds/29515022/source?filename=sharding-scaling%2Fsharding-scaling-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fshardingsphere%2Fshardingscaling%2Fcore%2Fexecute%2Fexecutor%2Fchannel%2FMemoryChannel.java#L61) | 8 | 51.85% |
   <!-- | **Total:** | **18** |  | -->
   
   |  Totals | [![Coverage Status](https://coveralls.io/builds/29515022/badge)](https://coveralls.io/builds/29515022) |
   | :-- | --: |
   | Change from base [Build 1133](https://coveralls.io/builds/29514128): |  -0.08% |
   | Covered Lines: | 11889 |
   | Relevant Lines: | 20331 |
   
   ---
   ##### 💛  - [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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] meAsky commented on a change in pull request #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
meAsky commented on a change in pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873#discussion_r395989082
 
 

 ##########
 File path: sharding-orchestration/sharding-orchestration-center/sharding-orchestration-center-apollo/src/test/java/org/apache/shardingsphere/orchestration/center/instance/ApolloPropertiesTest.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * 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.orchestration.center.instance;
+
+import org.junit.Test;
+import java.util.Properties;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public final class ApolloPropertiesTest {
+
+    @Test
+    public void assertGetValue() {
+        Properties props = new Properties();
+        props.setProperty(ApolloPropertyKey.APP_ID.getKey(), "APOLLO_SHARDING_SPHERE1");
 
 Review comment:
   Thanks for your advice

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull request #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873#discussion_r395984135
 
 

 ##########
 File path: sharding-orchestration/sharding-orchestration-center/sharding-orchestration-center-apollo/src/test/java/org/apache/shardingsphere/orchestration/center/instance/ApolloPropertiesTest.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * 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.orchestration.center.instance;
+
+import org.junit.Test;
+import java.util.Properties;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public final class ApolloPropertiesTest {
+
+    @Test
+    public void assertGetValue() {
+        Properties props = new Properties();
+        props.setProperty(ApolloPropertyKey.APP_ID.getKey(), "APOLLO_SHARDING_SPHERE1");
 
 Review comment:
   "APOLLO_SHARDINGSPHERE1" is better.

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] kimmking commented on a change in pull request #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
kimmking commented on a change in pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873#discussion_r395984087
 
 

 ##########
 File path: sharding-orchestration/sharding-orchestration-center/sharding-orchestration-center-apollo/src/test/java/org/apache/shardingsphere/orchestration/center/instance/ApolloPropertiesTest.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * 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.orchestration.center.instance;
+
+import org.junit.Test;
+import java.util.Properties;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public final class ApolloPropertiesTest {
+
+    @Test
+    public void assertGetValue() {
+        Properties props = new Properties();
+        props.setProperty(ApolloPropertyKey.APP_ID.getKey(), "APOLLO_SHARDING_SPHERE1");
+        props.setProperty(ApolloPropertyKey.ENV.getKey(), "PROD");
+        props.setProperty(ApolloPropertyKey.CLUSTER_NAME.getKey(), "sit");
+        props.setProperty(ApolloPropertyKey.ADMINISTRATOR.getKey(), "guest");
+        props.setProperty(ApolloPropertyKey.TOKEN.getKey(), "a6e6bbec-1eed-4ddc-bb10-6791beb982d9");
+        props.setProperty(ApolloPropertyKey.PORTAL_URL.getKey(), "http://apollo.ctrip.sit");
 
 Review comment:
   "http://config-service-url"  should be better here.

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


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] meAsky commented on a change in pull request #4873: Test case of ApolloProperties

Posted by GitBox <gi...@apache.org>.
meAsky commented on a change in pull request #4873: Test case of ApolloProperties
URL: https://github.com/apache/incubator-shardingsphere/pull/4873#discussion_r395989085
 
 

 ##########
 File path: sharding-orchestration/sharding-orchestration-center/sharding-orchestration-center-apollo/src/test/java/org/apache/shardingsphere/orchestration/center/instance/ApolloPropertiesTest.java
 ##########
 @@ -0,0 +1,61 @@
+/*
+ * 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.orchestration.center.instance;
+
+import org.junit.Test;
+import java.util.Properties;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public final class ApolloPropertiesTest {
+
+    @Test
+    public void assertGetValue() {
+        Properties props = new Properties();
+        props.setProperty(ApolloPropertyKey.APP_ID.getKey(), "APOLLO_SHARDING_SPHERE1");
+        props.setProperty(ApolloPropertyKey.ENV.getKey(), "PROD");
+        props.setProperty(ApolloPropertyKey.CLUSTER_NAME.getKey(), "sit");
+        props.setProperty(ApolloPropertyKey.ADMINISTRATOR.getKey(), "guest");
+        props.setProperty(ApolloPropertyKey.TOKEN.getKey(), "a6e6bbec-1eed-4ddc-bb10-6791beb982d9");
+        props.setProperty(ApolloPropertyKey.PORTAL_URL.getKey(), "http://apollo.ctrip.sit");
 
 Review comment:
   Thanks for your advice

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


With regards,
Apache Git Services