File: remove-tests-with-yield.patch

package info (click to toggle)
python-jaeger-client 4.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 940 kB
  • sloc: python: 5,578; makefile: 93; sh: 26; awk: 16
file content (118 lines) | stat: -rw-r--r-- 4,431 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
Description: Removed tests with yield
 It's not allowed to have yield in tests, apparently.
Author: Thomas Goirand <zigo@debian.org>
Bug-Debian: https://bugs.debian.org/1114306
Forwarded: no
Last-Update: 2025-09-29

Index: python-jaeger-client/tests/test_crossdock.py
===================================================================
--- python-jaeger-client.orig/tests/test_crossdock.py
+++ python-jaeger-client/tests/test_crossdock.py
@@ -71,70 +71,6 @@ for s2 in ['HTTP', 'TCHANNEL']:
 
 
 # noinspection PyShadowingNames
-@pytest.mark.parametrize('s2_transport,s3_transport,sampled', PERMUTATIONS)
-@pytest.mark.gen_test
-@pytest.mark.skipif(SKIP_TESTS, reason='crossdock tests only work with Tornado<6')
-def test_trace_propagation(
-        s2_transport, s3_transport, sampled, tracer,
-        base_url, http_port, http_client):
-
-    # verify that server is ready
-    yield http_client.fetch(
-        request=HTTPRequest(
-            url=base_url,
-            method='HEAD',
-        )
-    )
-
-    level3 = dict()
-    level3['serviceName'] = 'python'
-    level3['serverRole'] = 's3'
-    level3['transport'] = s3_transport
-    level3['host'] = 'localhost'
-    level3['port'] = str(http_port) if s3_transport == 'HTTP' else tchannel_port
-
-    level2 = dict()
-    level2['serviceName'] = 'python'
-    level2['serverRole'] = 's2'
-    level2['transport'] = s2_transport
-    level2['host'] = 'localhost'
-    level2['port'] = str(http_port) if s2_transport == 'HTTP' else tchannel_port
-    level2['downstream'] = level3
-
-    level1 = dict()
-    level1['baggage'] = 'Zoidberg'
-    level1['serverRole'] = 's1'
-    level1['sampled'] = sampled
-    level1['downstream'] = level2
-    body = json.dumps(level1)
-
-    with mock.patch('opentracing.tracer', tracer):
-        assert opentracing.global_tracer() == tracer  # sanity check that patch worked
-
-        req = HTTPRequest(url='%s/start_trace' % base_url, method='POST',
-                          headers={'Content-Type': 'application/json'},
-                          body=body,
-                          request_timeout=2)
-
-        response = yield http_client.fetch(req)
-        assert response.code == 200
-        tr = server.serializer.traceresponse_from_json(response.body)
-        assert tr is not None
-        assert tr.span is not None
-        assert tr.span.baggage == level1.get('baggage')
-        assert tr.span.sampled == sampled
-        assert tr.span.traceId is not None
-        assert tr.downstream is not None
-        assert tr.downstream.span.baggage == level1.get('baggage')
-        assert tr.downstream.span.sampled == sampled
-        assert tr.downstream.span.traceId == tr.span.traceId
-        assert tr.downstream.downstream is not None
-        assert tr.downstream.downstream.span.baggage == level1.get('baggage')
-        assert tr.downstream.downstream.span.sampled == sampled
-        assert tr.downstream.downstream.span.traceId == tr.span.traceId
-
-
-# noinspection PyShadowingNames
 @pytest.mark.gen_test
 @pytest.mark.skipif(SKIP_TESTS, reason='crossdock tests only work with Tornado<6')
 def test_endtoend_handler(tracer):
Index: python-jaeger-client/tests/test_local_agent_net.py
===================================================================
--- python-jaeger-client.orig/tests/test_local_agent_net.py
+++ python-jaeger-client/tests/test_local_agent_net.py
@@ -62,31 +62,3 @@ application = tornado.web.Application([
 def app():
     return application
 
-
-@pytest.mark.gen_test
-def test_request_sampling_strategy(http_client, base_url):
-    o = urlparse(base_url)
-    sender = LocalAgentSender(
-        host='localhost',
-        sampling_port=o.port,
-        reporting_port=DEFAULT_REPORTING_PORT
-    )
-    response = yield sender.request_sampling_strategy(service_name='svc', timeout=15)
-    assert response.body == test_strategy.encode('utf-8')
-
-
-@pytest.mark.gen_test
-def test_request_throttling_credits(http_client, base_url):
-    o = urlparse(base_url)
-    sender = LocalAgentSender(
-        host='localhost',
-        sampling_port=o.port,
-        reporting_port=DEFAULT_REPORTING_PORT,
-        throttling_port=o.port,
-    )
-    response = yield sender.request_throttling_credits(
-        service_name='svc',
-        client_id=test_client_id,
-        operations=['test-operation'],
-        timeout=15)
-    assert response.body == test_credits.encode('utf-8')