File tree 1 file changed +13
-0
lines changed
instrumentation/opentelemetry-instrumentation-pymemcache/tests
1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -509,6 +509,19 @@ def test_uninstrumented(self):
509
509
510
510
PymemcacheInstrumentor ().instrument ()
511
511
512
+ def test_no_op_tracer_provider (self ):
513
+ PymemcacheInstrumentor ().uninstrument ()
514
+ tracer_provider = trace_api .NoOpTracerProvider ()
515
+ PymemcacheInstrumentor ().instrument (tracer_provider = tracer_provider )
516
+
517
+ client = self .make_client ([b"STORED\r \n " ])
518
+ result = client .set (b"key" , b"value" , noreply = False )
519
+ self .assertTrue (result )
520
+
521
+ spans = self .memory_exporter .get_finished_spans ()
522
+ assert spans is not None
523
+ self .assertEqual (len (spans ), 0 )
524
+
512
525
513
526
class PymemcacheHashClientTestCase (TestBase ):
514
527
"""Tests for a patched pymemcache.client.hash.HashClient."""
You can’t perform that action at this time.
0 commit comments