You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "CodePrometheus (via GitHub)" <gi...@apache.org> on 2023/03/13 10:32:24 UTC

[GitHub] [dubbo-samples] CodePrometheus opened a new pull request, #790: Add dubbo-samples-cat

CodePrometheus opened a new pull request, #790:
URL: https://github.com/apache/dubbo-samples/pull/790

   Dubbo and [Cat](https://github.com/dianping/cat/)


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] Add dubbo-samples-cat [dubbo-samples]

Posted by "CodePrometheus (via GitHub)" <gi...@apache.org>.
CodePrometheus closed pull request #790: Add dubbo-samples-cat
URL: https://github.com/apache/dubbo-samples/pull/790


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] AlbumenJ commented on a diff in pull request #790: Add dubbo-samples-cat

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on code in PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#discussion_r1139748137


##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,41 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider

Review Comment:
   ```suggestion
     cat-provider:
       type: app
       basedir: dubbo-samples-cat-provider
       mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
       systemProps:
         - zookeeper.address=cat-provider
         - zookeeper.port=2181
         - dubbo.address=cat-provider
         - dubbo.port=20880
         - cat.host=cat-consumer
       waitPortsBeforeRun:
         - zookeeper:2181
       depends_on:
         - zookeeper
   ```



##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,41 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
+
+  cat-consumer:
+    type: test
+    basedir: dubbo-samples-cat-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=cat-provider
+      - zookeeper.port=2181
+      - dubbo.address=cat-provider
+      - dubbo.port=20880
+      - cat.host=cat-consumer
+    waitPortsBeforeRun:
+      - cat-provider:2181
+      - cat-provider:20880
+    depends_on:
+      - cat-provider

Review Comment:
   ```suggestion
       depends_on:
         - cat-provider
         - zookeeper
   ```



##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,41 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
+
+  cat-consumer:
+    type: test
+    basedir: dubbo-samples-cat-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=cat-provider
+      - zookeeper.port=2181
+      - dubbo.address=cat-provider
+      - dubbo.port=20880
+      - cat.host=cat-consumer
+    waitPortsBeforeRun:
+      - cat-provider:2181

Review Comment:
   ```suggestion
         - zookeeper:2181
   ```



##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,41 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
+
+  cat-consumer:
+    type: test
+    basedir: dubbo-samples-cat-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=cat-provider

Review Comment:
   ```suggestion
         - zookeeper.address=zookeeper
   ```



-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] CodePrometheus commented on pull request #790: Add dubbo-samples-cat

Posted by "CodePrometheus (via GitHub)" <gi...@apache.org>.
CodePrometheus commented on PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#issuecomment-1466078646

   > LGTM Would you please add some integration test cases to verify this feature automatically?
   
   ok, I will add later


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] AlbumenJ commented on a diff in pull request #790: Add dubbo-samples-cat

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on code in PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#discussion_r1134825114


##########
4-governance/dubbo-samples-cat/dubbo-samples-cat-consumer/src/test/java/org/apache/dubbo/samples/cat/consumer/CatMetricsIT.java:
##########
@@ -0,0 +1,71 @@
+/*
+ * 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.dubbo.samples.cat.consumer;
+
+import com.dianping.cat.Cat;
+import com.dianping.cat.message.Transaction;
+import okhttp3.OkHttpClient;
+import okhttp3.Request;
+import okhttp3.Response;
+import org.apache.dubbo.samples.cat.api.DemoService;
+import org.apache.dubbo.samples.cat.api.context.CatContext;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import javax.annotation.Resource;
+
+@SpringBootTest
+@RunWith(SpringRunner.class)
+public class CatMetricsIT {
+
+    private static String CAT_HOST = "http://192.168.60.48:8080/cat/r/m/cat-consumer-ac171001-466309-1006?domain=cat-consumer";

Review Comment:
   ```suggestion
       private static String CAT_HOST = "http://"+System.getProperties("cat.host","127.0.0.1")+":8080/cat/r/m/cat-consumer-ac171001-466309-1006?domain=cat-consumer";
   ```



##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,40 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
+
+  cat-consumer:
+    type: test
+    basedir: dubbo-samples-cat-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=cat-provider
+      - zookeeper.port=2181
+      - dubbo.address=cat-provider
+      - dubbo.port=20880

Review Comment:
   ```suggestion
       systemProps:
         - zookeeper.address=cat-provider
         - zookeeper.port=2181
         - dubbo.address=cat-provider
         - dubbo.port=20880
         - cat.host=cat-consumer
   ```



-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] AlbumenJ commented on pull request #790: Add dubbo-samples-cat

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#issuecomment-1473140217

   ![image](https://user-images.githubusercontent.com/9292748/225817951-8097c659-dca8-4045-8904-5f850c48ee59.png)
   


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] songxiaosheng commented on pull request #790: Add dubbo-samples-cat

Posted by "songxiaosheng (via GitHub)" <gi...@apache.org>.
songxiaosheng commented on PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#issuecomment-1474868874

   Can you implement cat monitoring through filters in the future


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] CodePrometheus commented on a diff in pull request #790: Add dubbo-samples-cat

Posted by "CodePrometheus (via GitHub)" <gi...@apache.org>.
CodePrometheus commented on code in PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#discussion_r1135315587


##########
4-governance/dubbo-samples-cat/case-configuration.yml:
##########
@@ -0,0 +1,40 @@
+# 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.
+
+services:
+  zookeeper:
+    image: zookeeper:latest
+
+  cat-provider:
+    type: app
+    basedir: dubbo-samples-cat-provider
+    mainClass: org.apache.dubbo.samples.cat.provider.CatProvider
+
+  cat-consumer:
+    type: test
+    basedir: dubbo-samples-cat-consumer
+    tests:
+      - "**/*IT.class"
+    systemProps:
+      - zookeeper.address=cat-provider
+      - zookeeper.port=2181
+      - dubbo.address=cat-provider
+      - dubbo.port=20880

Review Comment:
   It seems that it can't connect to zookeeper



-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-samples] CodePrometheus commented on pull request #790: Add dubbo-samples-cat

Posted by "CodePrometheus (via GitHub)" <gi...@apache.org>.
CodePrometheus commented on PR #790:
URL: https://github.com/apache/dubbo-samples/pull/790#issuecomment-1465982943

   @AlbumenJ  @chickenlj 


-- 
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@dubbo.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org