This repository was archived by the owner on Jun 26, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ def get_port
7272 end
7373
7474 insist { events . length } == event_count
75+ events = events . sort_by { |e | e . get ( "message" ) } # the ordering of events in the queue is highly timing-dependent
7576 event_count . times do |i |
7677 event = events [ i ]
7778 insist { event . get ( "message" ) } == "#{ i } ☹"
@@ -106,6 +107,7 @@ def get_port
106107 end
107108
108109 insist { events . length } == event_count
110+ events = events . sort_by { |e | e . get ( "message" ) } # the ordering of events in the queue is highly timing-dependent
109111 event_count . times do |i |
110112 insist { events [ i ] . get ( "message" ) } == "#{ i } ☹"
111113 insist { events [ i ] . get ( "host" ) } == "1.2.3.4"
@@ -231,6 +233,7 @@ def get_port
231233 ( 1 ..event_count ) . map { queue . pop }
232234 end
233235
236+ events = events . sort_by { |e | e . get ( "idx" ) } # the ordering of events in the queue is highly timing-dependent
234237 events . each_with_index do |event , idx |
235238 insist { event . get ( "hello" ) } == data [ "hello" ]
236239 insist { event . get ( "foo" ) . to_a } == data [ "foo" ] # to_a to cast Java ArrayList produced by JrJackson
You can’t perform that action at this time.
0 commit comments