summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormbeierl <mark.beierl@dell.com>2017-01-31 12:57:56 -0500
committermbeierl <mark.beierl@dell.com>2017-01-31 12:57:56 -0500
commitae4a3d47a67dfddd3a222a1f06c3212956567d24 (patch)
treee2f93a00589d9ecc8e3d55754f61dae4f7681398
parent83e2fb154a4e89901b57cfca1931167898a2833f (diff)
Fixing double JSON encoding of results payload
Change-Id: I5e5a8180d5851630b1200ade84f6beb5dfa18466 Signed-off-by: mbeierl <mark.beierl@dell.com>
-rw-r--r--storperf/db/test_results_db.py7
-rw-r--r--storperf/utilities/data_handler.py3
2 files changed, 5 insertions, 5 deletions
diff --git a/storperf/db/test_results_db.py b/storperf/db/test_results_db.py
index bb328db..038525f 100644
--- a/storperf/db/test_results_db.py
+++ b/storperf/db/test_results_db.py
@@ -44,9 +44,10 @@ def push_results_to_db(db_url, project, case_name,
headers = {'Content-Type': 'application/json'}
try:
if logger:
+ jsonified_params = json.dumps(params)
logger.info("Pushing results to %s" % (url))
- logger.debug("Parameters: %s" % params)
- r = requests.post(url, data=json.dumps(params), headers=headers)
+ logger.debug("Parameters: %s" % jsonified_params[:1024])
+ r = requests.post(url, data=jsonified_params, headers=headers)
if logger:
logger.debug(r)
logger.debug(r.status_code)
@@ -56,5 +57,5 @@ def push_results_to_db(db_url, project, case_name,
logger.error("Error [push_results_to_db('%s', '%s', '%s', " +
"'%s', '%s', '%s', '%s', '%s', '%s')]:" %
(db_url, project, case_name, pod_name, version,
- scenario, criteria, build_tag, details[:512]), e)
+ scenario, criteria, build_tag, details), e)
return False
diff --git a/storperf/utilities/data_handler.py b/storperf/utilities/data_handler.py
index 2f79054..78708b5 100644
--- a/storperf/utilities/data_handler.py
+++ b/storperf/utilities/data_handler.py
@@ -17,7 +17,6 @@ from storperf.utilities import math as math
from storperf.utilities import steady_state as SteadyState
from time import sleep
import time
-import json
class DataHandler(object):
@@ -179,6 +178,6 @@ class DataHandler(object):
scenario,
criteria,
build_tag,
- json.dumps(payload))
+ payload)
except:
self.logger.exception("Error pushing results into Database")