diff options
author | Ilya Shakhat <shakhat@gmail.com> | 2017-06-21 17:33:09 +0200 |
---|---|---|
committer | Ilya Shakhat <shakhat@gmail.com> | 2017-07-31 17:59:37 +0200 |
commit | 362c4f7b19a4715810f5c6ad64a239a1f5f1cb08 (patch) | |
tree | dfedf4870967e9eafaa9b12757f61307eb2d4d58 /osprofiler/tests | |
parent | cffca4e29e373e3f09f2ffdd458761183a851569 (diff) | |
download | osprofiler-362c4f7b19a4715810f5c6ad64a239a1f5f1cb08.tar.gz |
Remove unused parameters from Profiler class
Profiler class is declared to accept 'project', 'service'
and 'connection_str' parameters, which actually have never
been used. This leads to null values inside 'info' dict in
trace data, e.g. to following:
"meta.raw_payload.wsgi-stop": {
"info": {
"project": null,
"host": "allinone172.butterfly.org",
"service": null
},
}
True values for 'service' and 'project' are injected by
notifier into 'payload' section of tracing event.
Change-Id: I3a13bb9ff180be5e3f767aa71fed985d990856ab
Diffstat (limited to 'osprofiler/tests')
-rw-r--r-- | osprofiler/tests/functional/test_driver.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/osprofiler/tests/functional/test_driver.py b/osprofiler/tests/functional/test_driver.py index 6a1b020..6b4bcb8 100644 --- a/osprofiler/tests/functional/test_driver.py +++ b/osprofiler/tests/functional/test_driver.py @@ -61,10 +61,7 @@ class DriverTestCase(test.TestCase): "project": self.PROJECT} self._assert_dict(child["info"], **exp_info) - exp_raw_info = {"project": self.PROJECT, - "service": self.SERVICE} raw_start = child["info"]["meta.raw_payload.%s-start" % name] - self._assert_dict(raw_start["info"], **exp_raw_info) self.assertEqual(fn_name, raw_start["info"]["function"]["name"]) exp_raw = {"name": "%s-start" % name, "service": self.SERVICE, @@ -74,14 +71,13 @@ class DriverTestCase(test.TestCase): self._assert_dict(raw_start, **exp_raw) raw_stop = child["info"]["meta.raw_payload.%s-stop" % name] - self._assert_dict(raw_stop["info"], **exp_raw_info) exp_raw["name"] = "%s-stop" % name self._assert_dict(raw_stop, **exp_raw) def test_get_report(self): initializer.init_from_conf( CONF, None, self.PROJECT, self.SERVICE, "host") - profiler.init("SECRET_KEY", project=self.PROJECT, service=self.SERVICE) + profiler.init("SECRET_KEY") foo = DriverTestCase.Foo() foo.bar(1) |