Beispiel #1
0
    def test_uninstrumented(self):
        PymemcacheInstrumentor().uninstrument()

        client = self.make_client(
            [b"STORED\r\n", b"VALUE key 0 5\r\nvalue\r\nEND\r\n"])
        client.set(b"key", b"value", noreply=False)
        result = client.get(b"key")
        assert _str(result) == "value"

        spans = self.memory_exporter.get_finished_spans()

        self.assertEqual(len(spans), 0)

        PymemcacheInstrumentor().instrument()
Beispiel #2
0
 def tearDown(self):
     super().tearDown()
     PymemcacheInstrumentor().uninstrument()
Beispiel #3
0
    def setUp(self):
        super().setUp()
        PymemcacheInstrumentor().instrument()

        # pylint: disable=protected-access
        self.tracer = get_tracer(__name__)