summaryrefslogtreecommitdiff
path: root/osprofiler/tests
diff options
context:
space:
mode:
authorShoham Peller <shohamp@gmail.com>2018-11-22 17:02:44 +0200
committerShoham Peller <shohamp@gmail.com>2018-12-16 15:48:15 +0200
commitde5f31650e21b340cbac9499152f6ff8db3a14fa (patch)
tree5e153b7777ba06c69ed1e78f4ca2a30513ab309f /osprofiler/tests
parent48a3de18f81f7ee5b4c12931d1d344232900dcd3 (diff)
downloadosprofiler-de5f31650e21b340cbac9499152f6ff8db3a14fa.tar.gz
In case of an error, always add message
The Jaeger driver counts on this message to be in the error description. It fails if the message is not present Closes-Bug: 1804218 Change-Id: I08f8328700049d9a0d791b12375fe9a6e8a3948a
Diffstat (limited to 'osprofiler/tests')
-rw-r--r--osprofiler/tests/unit/test_profiler.py2
-rw-r--r--osprofiler/tests/unit/test_sqlalchemy.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/osprofiler/tests/unit/test_profiler.py b/osprofiler/tests/unit/test_profiler.py
index 00dcd0f..fbe0ccd 100644
--- a/osprofiler/tests/unit/test_profiler.py
+++ b/osprofiler/tests/unit/test_profiler.py
@@ -260,7 +260,7 @@ class TraceDecoratorTestCase(test.TestCase):
"name": "osprofiler.tests.unit.test_profiler.test_fn_exc"
}
}
- expected_stop_info = {"etype": "ValueError"}
+ expected_stop_info = {"etype": "ValueError", "message": ""}
mock_start.assert_called_once_with("foo", info=expected_info)
mock_stop.assert_called_once_with(info=expected_stop_info)
diff --git a/osprofiler/tests/unit/test_sqlalchemy.py b/osprofiler/tests/unit/test_sqlalchemy.py
index 0b20aa5..3ccf6bf 100644
--- a/osprofiler/tests/unit/test_sqlalchemy.py
+++ b/osprofiler/tests/unit/test_sqlalchemy.py
@@ -62,6 +62,7 @@ class SqlalchemyTracingTestCase(test.TestCase):
sqlalchemy.handle_error(sqlalchemy_exception_ctx)
expected_info = {
"etype": "Exception",
+ "message": "error",
"db": {
"original_exception": str(original_exception),
"chained_exception": str(chained_exception),