|
50 | 50 | context "of 0" do
|
51 | 51 | let(:read_timeout) { 0 }
|
52 | 52 |
|
53 |
| - it "times out" do |
54 |
| - skip "flaky environment" if flaky_env? |
| 53 | + it "times out", :flaky do |
55 | 54 | expect { response }.to raise_error(HTTP::TimeoutError, /Read/i)
|
56 | 55 | end
|
57 | 56 | end
|
58 | 57 |
|
59 | 58 | context "of 2.5" do
|
60 | 59 | let(:read_timeout) { 2.5 }
|
61 | 60 |
|
62 |
| - it "does not time out" do |
63 |
| - # TODO: investigate sporadic JRuby timeouts on CI |
64 |
| - skip "flaky environment" if flaky_env? |
65 |
| - |
| 61 | + it "does not time out", :flaky do |
66 | 62 | expect { client.get("#{server.endpoint}/sleep").body.to_s }.to_not raise_error
|
67 | 63 | end
|
68 | 64 | end
|
|
96 | 92 |
|
97 | 93 | let(:read_timeout) { 2.5 }
|
98 | 94 |
|
99 |
| - it "does not timeout" do |
100 |
| - # TODO: investigate sporadic JRuby timeouts on CI |
101 |
| - skip "flaky environment" if flaky_env? |
102 |
| - |
| 95 | + it "does not timeout", :flaky do |
103 | 96 | client.get("#{server.endpoint}/sleep").body.to_s
|
104 | 97 | client.get("#{server.endpoint}/sleep").body.to_s
|
105 | 98 | end
|
|
130 | 123 | end
|
131 | 124 |
|
132 | 125 | context "on a mixed state" do
|
133 |
| - it "re-opens the connection" do |
134 |
| - skip "flaky environment" if flaky_env? |
135 |
| - |
| 126 | + it "re-opens the connection", :flaky do |
136 | 127 | first_socket_id = client.get("#{server.endpoint}/socket/1").body.to_s
|
137 | 128 |
|
138 | 129 | client.instance_variable_set(:@state, :dirty)
|
|
163 | 154 | end
|
164 | 155 |
|
165 | 156 | context "with a socket issue" do
|
166 |
| - it "transparently reopens" do |
167 |
| - skip "flaky environment" if flaky_env? |
168 |
| - |
| 157 | + it "transparently reopens", :flaky do |
169 | 158 | first_socket_id = client.get("#{server.endpoint}/socket").body.to_s
|
170 | 159 | expect(first_socket_id).to_not eq("")
|
171 | 160 | # Kill off the sockets we used
|
|
195 | 184 | context "when disabled" do
|
196 | 185 | let(:options) { {} }
|
197 | 186 |
|
198 |
| - it "opens new sockets" do |
199 |
| - skip "flaky environment" if flaky_env? |
200 |
| - |
| 187 | + it "opens new sockets", :flaky do |
201 | 188 | expect(sockets_used).to_not include("")
|
202 | 189 | expect(sockets_used.uniq.length).to eq(2)
|
203 | 190 | end
|
|
0 commit comments