@@ -66,12 +66,7 @@ def test_timestamp_instrumentation_builder():
6666 assert not instr2 .is_instrumented (InterceptionPoint .RECEIVE )
6767
6868 # Build with only route and receive
69- instr3 = (
70- TimestampInstrumentationBuilder ()
71- .set_route (True )
72- .set_receive (True )
73- .build ()
74- )
69+ instr3 = TimestampInstrumentationBuilder ().set_route (True ).set_receive (True ).build ()
7570 assert not instr3 .is_instrumented (InterceptionPoint .SEND )
7671 assert instr3 .is_instrumented (InterceptionPoint .ROUTE )
7772 assert instr3 .is_instrumented (InterceptionPoint .RECEIVE )
@@ -105,12 +100,7 @@ def sub_callback(sample: Sample):
105100 time .sleep (SLEEP )
106101
107102 # Test with timestamp_instrumentation
108- instr = (
109- TimestampInstrumentationBuilder ()
110- .set_send (True )
111- .set_receive (True )
112- .build ()
113- )
103+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
114104 publisher .put (msg , timestamp_instrumentation = instr )
115105
116106 time .sleep (SLEEP )
@@ -168,12 +158,7 @@ def sub_callback(sample: Sample):
168158 subscriber = peer02 .declare_subscriber (keyexpr , sub_callback )
169159 time .sleep (SLEEP )
170160
171- instr = (
172- TimestampInstrumentationBuilder ()
173- .set_send (True )
174- .set_receive (True )
175- .build ()
176- )
161+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
177162 peer01 .put (keyexpr , msg , timestamp_instrumentation = instr )
178163
179164 time .sleep (SLEEP )
@@ -199,12 +184,7 @@ def queryable_callback(query):
199184 queryable = peer01 .declare_queryable (keyexpr , queryable_callback )
200185 time .sleep (SLEEP )
201186
202- instr = (
203- TimestampInstrumentationBuilder ()
204- .set_send (True )
205- .set_receive (True )
206- .build ()
207- )
187+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
208188 replies = peer02 .get (keyexpr , timestamp_instrumentation = instr )
209189 for reply in replies :
210190 sample = reply .ok
@@ -239,12 +219,7 @@ def sub_callback(sample: Sample):
239219 subscriber = peer02 .declare_subscriber (keyexpr , sub_callback )
240220 time .sleep (SLEEP )
241221
242- instr = (
243- TimestampInstrumentationBuilder ()
244- .set_send (True )
245- .set_receive (True )
246- .build ()
247- )
222+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
248223 publisher .delete (timestamp_instrumentation = instr )
249224
250225 time .sleep (SLEEP )
@@ -274,12 +249,7 @@ def queryable_callback(query):
274249 querier = peer02 .declare_querier (keyexpr )
275250 time .sleep (SLEEP )
276251
277- instr = (
278- TimestampInstrumentationBuilder ()
279- .set_send (True )
280- .set_receive (True )
281- .build ()
282- )
252+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
283253 replies = querier .get (timestamp_instrumentation = instr )
284254 for reply in replies :
285255 sample = reply .ok
@@ -345,12 +315,7 @@ def sub_callback(sample: Sample):
345315 subscriber = peer02 .declare_subscriber (keyexpr , sub_callback )
346316 time .sleep (SLEEP )
347317
348- instr = (
349- TimestampInstrumentationBuilder ()
350- .set_send (True )
351- .set_receive (True )
352- .build ()
353- )
318+ instr = TimestampInstrumentationBuilder ().set_send (True ).set_receive (True ).build ()
354319 publisher .put (msg , timestamp_instrumentation = instr )
355320
356321 time .sleep (SLEEP )
0 commit comments