quarantine 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aaede44e051f9b183da284c82c86ae341ac4361bb8c36ba12f7cb11c4fc47350
4
- data.tar.gz: dce85fa1bac7d33224b907e53ed570763b87cbd783ae983d88e7dc563b0b0db0
3
+ metadata.gz: 4b012ecdd8fb1b5f4b8d014d294bdce9e02370d46afd79bf1f69577c4821f9dc
4
+ data.tar.gz: 6e9ac0c7edfb4d38db0487db389623b7ad75bdf342f74e97e471a6073d81357e
5
5
  SHA512:
6
- metadata.gz: dc724bcd18323c374bd1e8c5ae472db1579d9334e4d050c352058902981488a5659b542c26ba464e88d47bb102efb20ce9faa5990ba098225200cab11324792f
7
- data.tar.gz: 63d3dbeb70b087ba783a925cd57d1cf76488fbaae6819b53509fafe3b6609e2fb0e126f3ae03e70f00ebfe358cd93e42e4341bd44790b4773e6cf7c3d1921655
6
+ metadata.gz: e63db8d4dfc55809f9099fde29350ad86d88d6fb5617bfff576263bbd9ebb155f76d0f38c6e5dc9c7b465c969a8b21714ebacde8c7f8534c207aada2337d632b
7
+ data.tar.gz: 06ee957f72bcdf07da8b3b67d0bb5cbf62aa970c81dd991eb2a28c962d69c232b7f06a37062cf288b74531099e4aa7f2d0935fa00e296961d095c814ede34faf
@@ -1,3 +1,6 @@
1
+ ### 1.0.7
2
+ Support `it_behaves_like` behavior
3
+
1
4
  ### 1.0.6
2
5
  Update DynamoDB batch_write_item implementation to check for duplicates based on different keys before uploading
3
6
 
data/README.md CHANGED
@@ -25,7 +25,7 @@ Add these lines to your application's Gemfile:
25
25
  ```rb
26
26
  group :test do
27
27
  gem 'quarantine'
28
- gem 'rspec-retry
28
+ gem 'rspec-retry'
29
29
  end
30
30
  ```
31
31
 
@@ -100,7 +100,7 @@ end
100
100
 
101
101
  - Table name where failed test are uploaded `:quarantine_failed_tests_table, default: "master_failed_tests"`
102
102
 
103
- - Quarantined tests are not skipped automatically `:skip_quarantined_tests, default: true`
103
+ - Skipping quarantined tests during test runs `:skip_quarantined_tests, default: true`
104
104
 
105
105
  - Recording failed tests `:quarantine_record_failed_tests, default: true`
106
106
 
@@ -149,7 +149,3 @@ The AWS client loads credentials from the following locations (in order of prece
149
149
  To get AWS credentials, please contact your AWS administrator to get access to dynamodb and create your credentials through IAM.
150
150
 
151
151
  More detailed information can be found: [AWS documentation](https://docs.aws.amazon.com/sdkforruby/api/Aws/S3/Client.html)
152
-
153
- #### Why is `example.clear_exception` failing locally?
154
-
155
- `example.clear_exception` is an attribute added through `rspec_retry`. Make sure `rspec-retry` has been installed and configured.
@@ -4,6 +4,20 @@ require 'quarantine/test'
4
4
  require 'quarantine/databases/base'
5
5
  require 'quarantine/databases/dynamo_db'
6
6
 
7
+ module RSpec
8
+ module Core
9
+ class Example
10
+ # The implementation of clear_exception in rspec-retry doesn't work
11
+ # for examples that use `it_behaves_like`, so we implement our own version that
12
+ # clear the exception field recursively.
13
+ def clear_exception!
14
+ @exception = nil
15
+ example.clear_exception! if defined?(example)
16
+ end
17
+ end
18
+ end
19
+ end
20
+
7
21
  class Quarantine
8
22
  extend RSpecAdapter
9
23
 
@@ -119,11 +133,8 @@ class Quarantine
119
133
 
120
134
  # Param: RSpec::Core::Example
121
135
  # Clear exceptions on a flaky tests that has been quarantined
122
- #
123
- # example.clear_exception is tightly coupled with the rspec-retry gem and will only exist if
124
- # the rspec-retry gem is enabled
125
136
  def pass_flaky_test(example)
126
- example.clear_exception
137
+ example.clear_exception!
127
138
  add_to_summary(:quarantined_tests, example.id)
128
139
  end
129
140
 
@@ -1,3 +1,3 @@
1
1
  class Quarantine
2
- VERSION = '1.0.6'.freeze
2
+ VERSION = '1.0.7'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quarantine
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Flexport Engineering, Eric Zhu
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-10 00:00:00.000000000 Z
11
+ date: 2020-12-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-dynamodb
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0.6'
55
- description:
55
+ description:
56
56
  email:
57
57
  - ericzhu77@gmail.com
58
58
  executables:
@@ -76,7 +76,7 @@ homepage: https://github.com/flexport/quarantine
76
76
  licenses:
77
77
  - MIT
78
78
  metadata: {}
79
- post_install_message:
79
+ post_install_message:
80
80
  rdoc_options: []
81
81
  require_paths:
82
82
  - lib
@@ -92,7 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
92
92
  version: '0'
93
93
  requirements: []
94
94
  rubygems_version: 3.0.2
95
- signing_key:
95
+ signing_key:
96
96
  specification_version: 4
97
97
  summary: Quarantine flaky Ruby Rspec tests
98
98
  test_files: []