瀏覽代碼

master These just added noise to the err.txt files

There is no reason to log that an exception was thrown
during validation; it is sufficient to catch any exception,
return False, and let the output logs speak for themselves.
The error logs are for true errors like the application
server returning 500s, etc.
Mike Smith 11 年之前
父節點
當前提交
a6e11986d7
共有 1 個文件被更改,包括 10 次插入55 次删除
  1. 10 55
      toolset/benchmark/framework_test.py

+ 10 - 55
toolset/benchmark/framework_test.py

@@ -126,12 +126,7 @@ class FrameworkTest:
       if  obj["message"].lower() == "hello, world!":
         return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateJson raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -155,12 +150,7 @@ class FrameworkTest:
           type(float(obj["randomNumber"])) == float):
         return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateDb raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   def validateDbStrict(self, jsonString, out, err):
@@ -174,12 +164,7 @@ class FrameworkTest:
           type(float(obj["randomNumber"])) == float):
         return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateDbStrict raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
 
@@ -199,12 +184,7 @@ class FrameworkTest:
           type(float(arr[1]["randomNumber"])) == float):
         return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateQuery raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -229,12 +209,7 @@ class FrameworkTest:
       # By here, it's passed validation
       return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateQuery raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -259,12 +234,7 @@ class FrameworkTest:
       # By here, it's passed validation
       return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateQuery raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -278,12 +248,7 @@ class FrameworkTest:
 
       return parser.isValidFortune()
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateFortune raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -302,12 +267,7 @@ class FrameworkTest:
           type(float(arr[1]["randomNumber"])) == float):
         return True
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validateUpdate raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -317,12 +277,7 @@ class FrameworkTest:
     try:
       return jsonString.lower().strip() == "hello, world!"
     except:
-      err.write(textwrap.dedent("""
-          -----------------------------------------------------
-            Error: validatePlaintext raised exception
-          -----------------------------------------------------
-          {trace}
-          """.format( trace=sys.exc_info()[:2])))
+      pass
     return False
 
   ############################################################
@@ -419,7 +374,7 @@ class FrameworkTest:
         out.write(self.query_url + "2 - PASS\n\n")
       else:
         self.query_url_passed = False
-        out.write(self.query_url + "2 - ERROR\n\n")
+        out.write(self.query_url + "2 - FAIL\n\n")
       out.write("-----------------------------------------------------\n\n")
       out.flush()