Author: rwesten
Date: Thu May 16 13:12:40 2013
New Revision: 1483345

URL: http://svn.apache.org/r1483345
Log:
Minor: the RemoteServiceHelper now also ignores 401, 402 and 403 HTTP response 
code as all those indicate that the access to the service is not allowed (e.g. 
the quota allowed for the test user was already used)

Modified:
    
stanbol/trunk/enhancer/generic/test/src/main/java/org/apache/stanbol/enhancer/test/helper/RemoteServiceHelper.java

Modified: 
stanbol/trunk/enhancer/generic/test/src/main/java/org/apache/stanbol/enhancer/test/helper/RemoteServiceHelper.java
URL: 
http://svn.apache.org/viewvc/stanbol/trunk/enhancer/generic/test/src/main/java/org/apache/stanbol/enhancer/test/helper/RemoteServiceHelper.java?rev=1483345&r1=1483344&r2=1483345&view=diff
==============================================================================
--- 
stanbol/trunk/enhancer/generic/test/src/main/java/org/apache/stanbol/enhancer/test/helper/RemoteServiceHelper.java
 (original)
+++ 
stanbol/trunk/enhancer/generic/test/src/main/java/org/apache/stanbol/enhancer/test/helper/RemoteServiceHelper.java
 Thu May 16 13:12:40 2013
@@ -71,6 +71,18 @@ public final class RemoteServiceHelper {
                 log.warn("deactivate Test because Internal Error of remote 
serivce (Message: '"
                         +check.getMessage()+"')", e);
                 return;
+            } else if(message.contains("Server returned HTTP response code: 
401") ){
+                log.warn("deactivate Test because Server returned HTTP Error 
401 Unauthorized (Message: '"
+                        +check.getMessage()+"')", e);
+                return;
+            } else if(message.contains("Server returned HTTP response code: 
402") ){
+                log.warn("deactivate Test because Server returned HTTP Error 
402 Payment Required (Message: '"
+                        +check.getMessage()+"')", e);
+                return;
+            } else if(message.contains("Server returned HTTP response code: 
403") ){
+                log.warn("deactivate Test because Server returned HTTP Error 
403 Forbidden (Message: '"
+                        +check.getMessage()+"')", e);
+                return;
             } else if(containedInMessage != null){
                 for(String contained : containedInMessage){
                     if(message.contains(contained)){


Reply via email to