[jira] [Commented] (SCB-1060) edge support Exception converter

2018-12-06 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16712359#comment-16712359
 ] 

ASF GitHub Bot commented on SCB-1060:
-

coveralls edited a comment on issue #1018: [SCB-1060]edge support Exception 
converter
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1018#issuecomment-443616322
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20463357/badge)](https://coveralls.io/builds/20463357)
   
   Coverage decreased (-0.01%) to 86.732% when pulling 
**294b29d1a8fdcd9c0648988e21009c326bc500ac on heyile:edgeException** into 
**6c1df294382f12bbea3c87f4143fb40fe6f9f532 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> edge support Exception converter 
> -
>
> Key: SCB-1060
> URL: https://issues.apache.org/jira/browse/SCB-1060
> Project: Apache ServiceComb
>  Issue Type: Bug
>Reporter: 何一乐
>Assignee: 何一乐
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-1060) edge support Exception converter

2018-12-05 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16709951#comment-16709951
 ] 

ASF GitHub Bot commented on SCB-1060:
-

liubao68 closed pull request #1018: [SCB-1060]edge support Exception converter
URL: https://github.com/apache/servicecomb-java-chassis/pull/1018
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java
 
b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java
index 53edb8b9b..75f899195 100644
--- 
a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java
+++ 
b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/ConsumerMain.java
@@ -31,6 +31,7 @@
 import org.apache.servicecomb.it.testcase.TestDefaultValue;
 import org.apache.servicecomb.it.testcase.TestDownload;
 import org.apache.servicecomb.it.testcase.TestDownloadSlowStreamEdge;
+import org.apache.servicecomb.it.testcase.TestExceptionConvertEdge;
 import org.apache.servicecomb.it.testcase.TestGenericEdge;
 import org.apache.servicecomb.it.testcase.TestIgnoreMethod;
 import org.apache.servicecomb.it.testcase.TestIgnoreStaticMethod;
@@ -106,6 +107,7 @@ private static void runShareTestCases() throws Throwable {
 ITJUnitUtils.runWithRest(TestAcceptType.class);
 
 ITJUnitUtils.runWithRest(TestDownload.class);
+ITJUnitUtils.runWithHighwayAndRest(TestExceptionConvertEdge.class);
 
 ITJUnitUtils.runWithHighwayAndRest(TestTrace.class);
 ITJUnitUtils.run(TestTraceEdge.class);
diff --git 
a/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestExceptionConvertEdge.java
 
b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestExceptionConvertEdge.java
new file mode 100644
index 0..d022c2711
--- /dev/null
+++ 
b/integration-tests/it-consumer/src/main/java/org/apache/servicecomb/it/testcase/TestExceptionConvertEdge.java
@@ -0,0 +1,43 @@
+/*
+ * 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.servicecomb.it.testcase;
+
+import org.apache.servicecomb.it.extend.engine.GateRestTemplate;
+import org.junit.Assert;
+import org.junit.Test;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.client.HttpClientErrorException;
+import org.springframework.web.client.RestClientException;
+
+public class TestExceptionConvertEdge {
+  private static GateRestTemplate client = 
GateRestTemplate.createEdgeRestTemplate("edgeExceptionConvertSchema");
+
+  @Test
+  public void testTimeoutAdd() {
+int result = client.getForObject("/add?x=10=12", Integer.class);
+Assert.assertEquals(22, result);
+
+try {
+  client.getForObject("/add?x=88=21", Object.class);
+} catch (RestClientException e) {
+  HttpClientErrorException exception = (HttpClientErrorException) e;
+  Assert.assertEquals(HttpStatus.EXPECTATION_FAILED, 
exception.getStatusCode());
+  Assert.assertTrue(exception.getResponseBodyAsString().contains("change 
the response"));
+}
+  }
+}
diff --git 
a/integration-tests/it-edge/src/main/java/org/apache/servicecomb/it/edge/converter/CustomException.java
 
b/integration-tests/it-edge/src/main/java/org/apache/servicecomb/it/edge/converter/CustomException.java
new file mode 100644
index 0..e9f7fffec
--- /dev/null
+++ 
b/integration-tests/it-edge/src/main/java/org/apache/servicecomb/it/edge/converter/CustomException.java
@@ -0,0 +1,53 @@
+/*
+ * 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 

[jira] [Commented] (SCB-1060) edge support Exception converter

2018-12-03 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706830#comment-16706830
 ] 

ASF GitHub Bot commented on SCB-1060:
-

coveralls edited a comment on issue #1018: [SCB-1060]edge support Exception 
converter
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1018#issuecomment-443616322
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20414057/badge)](https://coveralls.io/builds/20414057)
   
   Coverage increased (+0.004%) to 86.748% when pulling 
**c7cf59ff4d734399b2fb78902bac84d77e476879 on heyile:edgeException** into 
**2b3626560adfbbc8e3f6d788567d82087bb33cf5 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> edge support Exception converter 
> -
>
> Key: SCB-1060
> URL: https://issues.apache.org/jira/browse/SCB-1060
> Project: Apache ServiceComb
>  Issue Type: Bug
>Reporter: 何一乐
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-1060) edge support Exception converter

2018-12-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706785#comment-16706785
 ] 

ASF GitHub Bot commented on SCB-1060:
-

coveralls commented on issue #1018: [SCB-1060]edge support Exception converter
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1018#issuecomment-443616322
 
 
   
   [![Coverage 
Status](https://coveralls.io/builds/20413444/badge)](https://coveralls.io/builds/20413444)
   
   Coverage increased (+0.002%) to 86.746% when pulling 
**a65f10cfd2e6f003f745f4708e836ea0bf991b7c on heyile:edgeException** into 
**2b3626560adfbbc8e3f6d788567d82087bb33cf5 on apache:master**.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> edge support Exception converter 
> -
>
> Key: SCB-1060
> URL: https://issues.apache.org/jira/browse/SCB-1060
> Project: Apache ServiceComb
>  Issue Type: Bug
>Reporter: 何一乐
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SCB-1060) edge support Exception converter

2018-12-02 Thread ASF GitHub Bot (JIRA)


[ 
https://issues.apache.org/jira/browse/SCB-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16706774#comment-16706774
 ] 

ASF GitHub Bot commented on SCB-1060:
-

heyile opened a new pull request #1018: [SCB-1060]edge support Exception 
converter
URL: https://github.com/apache/servicecomb-java-chassis/pull/1018
 
 
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
- [ ] Make sure there is a [JIRA 
issue](https://issues.apache.org/jira/browse/SCB) filed for the change (usually 
before you start working on it).  Trivial changes like typos do not require a 
JIRA issue.  Your pull request should address just this issue, without pulling 
in other changes.
- [ ] Each commit in the pull request should have a meaningful subject line 
and body.
- [ ] Format the pull request title like `[SCB-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `SCB-XXX` with the appropriate JIRA 
issue.
- [ ] Write a pull request description that is detailed enough to 
understand what the pull request does, how, and why.
- [ ] Run `mvn clean install` to make sure basic checks pass. A more 
thorough check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   ---
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> edge support Exception converter 
> -
>
> Key: SCB-1060
> URL: https://issues.apache.org/jira/browse/SCB-1060
> Project: Apache ServiceComb
>  Issue Type: Bug
>Reporter: 何一乐
>Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)