bugsnag-maze-runner 10.6.0 → 10.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/features/steps/span_steps.rb +12 -3
- data/lib/features/support/span_support.rb +37 -7
- data/lib/maze/schemas/validator.rb +1 -1
- data/lib/maze.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 62f2cbd9dc34f1d4bbf49ccb87c121895c763803bfc7fcf91ecae92899f7e163
|
|
4
|
+
data.tar.gz: ff5ee29b4d0d756d19138780bab0d1241e23a055d2549480ce93716dea1e11d5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8eb87c1d5d81dc49bcd707cdae472945003056a86d1e20a9f3cce6b316770dfbc94ecfc5e8589d327878d40afb1f621100775aae6cdb190d0f93feef69dbaf2e
|
|
7
|
+
data.tar.gz: 5184fccde87ef1950406af328f5ae9cb5aab4502699df6e9524e5c8f790741261a119817b8f33c3896553f1cd15a3601dcccfd6883586e96cbb2d19dffd476e0
|
|
@@ -10,7 +10,7 @@ end
|
|
|
10
10
|
#
|
|
11
11
|
# @step_input span_count [Integer] The number of spans to wait for
|
|
12
12
|
Then('I wait to receive {int} span(s)') do |span_count|
|
|
13
|
-
SpanSupport.assert_received_span_count
|
|
13
|
+
SpanSupport.assert_received_span_count span_count
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
# Waits for a minimum number of spans to be received, which may be spread across one or more trace requests.
|
|
@@ -18,7 +18,7 @@ end
|
|
|
18
18
|
#
|
|
19
19
|
# @step_input span_min [Integer] The minimum number of spans to wait for
|
|
20
20
|
Then('I wait to receive at least {int} span(s)') do |span_min|
|
|
21
|
-
SpanSupport.assert_received_minimum_span_count
|
|
21
|
+
SpanSupport.assert_received_minimum_span_count span_min
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
# Waits for a minimum number of spans to be received, which may be spread across one or more trace requests.
|
|
@@ -27,7 +27,16 @@ end
|
|
|
27
27
|
# @step_input span_min [Integer] The minimum number of spans to wait for
|
|
28
28
|
# @step_input span_max [Integer] The maximum number of spans to receive before failure
|
|
29
29
|
Then('I wait to receive between {int} and {int} span(s)') do |span_min, span_max|
|
|
30
|
-
SpanSupport.assert_received_ranged_span_count
|
|
30
|
+
SpanSupport.assert_received_ranged_span_count span_min, span_max
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Waits for a minimum number of spans to be received, which may be spread across one or more trace requests.
|
|
34
|
+
# If more spans than the maximum requested number of spans are received, this step will fail.
|
|
35
|
+
#
|
|
36
|
+
# @step_input span_min [Integer] The minimum number of spans to wait for
|
|
37
|
+
# @step_input span_max [Integer] The maximum number of spans to receive before failure
|
|
38
|
+
Then('I wait to receive a span named {string}') do |span_name|
|
|
39
|
+
SpanSupport.assert_received_named_span span_name
|
|
31
40
|
end
|
|
32
41
|
|
|
33
42
|
Then('I should have received no spans') do
|
|
@@ -15,22 +15,52 @@ class SpanSupport
|
|
|
15
15
|
named_spans
|
|
16
16
|
end
|
|
17
17
|
|
|
18
|
-
def
|
|
19
|
-
|
|
18
|
+
def named_span_exists?(span_name)
|
|
19
|
+
spans = spans_from_request_list(Maze::Server.traces)
|
|
20
|
+
named_spans = spans.find_all { |span| span['name'].eql?(span_name) }
|
|
21
|
+
!named_spans.empty?
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def assert_received_span_count(count)
|
|
25
|
+
assert_received_spans(count, count)
|
|
20
26
|
end
|
|
21
27
|
|
|
22
|
-
def assert_received_minimum_span_count(
|
|
23
|
-
assert_received_spans(
|
|
28
|
+
def assert_received_minimum_span_count(minimum)
|
|
29
|
+
assert_received_spans(minimum)
|
|
24
30
|
end
|
|
25
31
|
|
|
26
|
-
def assert_received_ranged_span_count(
|
|
27
|
-
assert_received_spans(
|
|
32
|
+
def assert_received_ranged_span_count(minimum, maximum)
|
|
33
|
+
assert_received_spans(minimum, maximum)
|
|
28
34
|
end
|
|
29
35
|
|
|
30
|
-
def
|
|
36
|
+
def assert_received_named_span(span_name)
|
|
31
37
|
timeout = Maze.config.receive_requests_wait
|
|
32
38
|
wait = Maze::Wait.new(timeout: timeout)
|
|
33
39
|
|
|
40
|
+
received = wait.until { SpanSupport.named_span_exists?(span_name) }
|
|
41
|
+
|
|
42
|
+
list = Maze::Server.traces
|
|
43
|
+
received_count = SpanSupport.spans_from_request_list(list).size
|
|
44
|
+
|
|
45
|
+
unless received
|
|
46
|
+
raise Test::Unit::AssertionFailedError.new <<-MESSAGE
|
|
47
|
+
Expected span with name #{span_name} not received within the #{timeout}s timeout (#{received_count} spans were received)}.
|
|
48
|
+
This could indicate that:
|
|
49
|
+
- Bugsnag crashed with a fatal error.
|
|
50
|
+
- Bugsnag did not make the requests that it should have done.
|
|
51
|
+
- The requests were made, but not deemed to be valid (e.g. missing integrity header).
|
|
52
|
+
- The requests made were prevented from being received due to a network or other infrastructure issue.
|
|
53
|
+
Please check the Maze Runner and device logs to confirm.)
|
|
54
|
+
MESSAGE
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
Maze::Schemas::Validator.validate_payload_elements(list, 'trace')
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def assert_received_spans(min_received, max_received = nil)
|
|
61
|
+
timeout = Maze.config.receive_requests_wait
|
|
62
|
+
wait = Maze::Wait.new(timeout: timeout)
|
|
63
|
+
list = Maze::Server.traces
|
|
34
64
|
received = wait.until { SpanSupport.spans_from_request_list(list).size >= min_received }
|
|
35
65
|
received_count = SpanSupport.spans_from_request_list(list).size
|
|
36
66
|
|
|
@@ -14,7 +14,7 @@ module Maze
|
|
|
14
14
|
# Tests that payloads for a specific path pass any additional validation checks
|
|
15
15
|
# Throws an AssertionFailedError with a list of issues on failure
|
|
16
16
|
#
|
|
17
|
-
# @param list [
|
|
17
|
+
# @param list [Maze::RequestList] An array of received requests
|
|
18
18
|
# @param list_name [String] The name of the payload list for received requests
|
|
19
19
|
def validate_payload_elements(list, list_name)
|
|
20
20
|
# Test to see if a custom validator exists for the list
|
data/lib/maze.rb
CHANGED
|
@@ -8,7 +8,7 @@ require_relative 'maze/timers'
|
|
|
8
8
|
# providing an alternative to the proliferation of global variables or singletons.
|
|
9
9
|
module Maze
|
|
10
10
|
|
|
11
|
-
VERSION = '10.
|
|
11
|
+
VERSION = '10.7.0'
|
|
12
12
|
|
|
13
13
|
class << self
|
|
14
14
|
attr_accessor :check, :driver, :internal_hooks, :mode, :start_time, :dynamic_retry, :public_address,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bugsnag-maze-runner
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 10.
|
|
4
|
+
version: 10.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Steve Kirkland
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2025-10-
|
|
12
|
+
date: 2025-10-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: cucumber
|