File tree Expand file tree Collapse file tree 1 file changed +0
-21
lines changed
sentry-ruby/spec/sentry/transactions Expand file tree Collapse file tree 1 file changed +0
-21
lines changed Original file line number Diff line number Diff line change 115115 expect ( transaction . trace_id ) . to eq ( request [ :trace_id ] )
116116 end
117117 end
118-
119- it "handles corrupted trace context during transaction creation" do
120- # TODO: does it make sense to even handle such case?
121- transaction = Sentry ::Transaction . new (
122- hub : Sentry . get_current_hub ,
123- trace_id : nil ,
124- name : "corrupted_trace_test" ,
125- op : "test"
126- )
127-
128- expect ( transaction . sample_rand ) . to be_a ( Float )
129- expect ( transaction . sample_rand ) . to be >= 0.0
130- expect ( transaction . sample_rand ) . to be < 1.0
131- expect ( Sentry ::Utils ::SampleRand . valid? ( transaction . sample_rand ) ) . to be true
132-
133- Sentry . start_transaction ( transaction : transaction )
134- expect ( [ true , false ] ) . to include ( transaction . sampled )
135-
136- baggage = transaction . get_baggage
137- expect ( baggage . items [ "sample_rand" ] ) . to match ( /\A \d +\. \d {6}\z / )
138- end
139118 end
140119end
You can’t perform that action at this time.
0 commit comments