gitlab_quality-test_tooling 0.9.2 → 0.9.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4705c9599c4ff8fdad916cf3eb3ee62e4701f384fa76a8b8f358249c3f630142
4
- data.tar.gz: c45ec5e61bac03819dec93d345577b8577f7279d4d0c8c6a1744d7d74e3bceb5
3
+ metadata.gz: fa16a309741761cbce53a73d541cef1c6bb587cd790492cddc02face87e4338b
4
+ data.tar.gz: 9cdba5b6c53c83adba07ce9cc0316568b4e8137955fe46faef7705b4b577a5d9
5
5
  SHA512:
6
- metadata.gz: 481900a88510d1b00a597209fc2e007d963d7a9defeb143ba96d9ecd8ee5bc4a60b5c50ca54b2613108cc41ae0212d7145edf5235f9fff01b40f1ba4ac7691fa
7
- data.tar.gz: 70c9094e72cd9c4f7651390747eff6cf4f1ac3942a6c79ac5947a9b58cf8d30eaa983268de73de33c45b9697a3e8e29d8871e1498e4e2a64468df21ea6caa0e4
6
+ metadata.gz: dbb5472b2c4a5d70b26806c2467faae4a8b6770a2cf0ddc61f27e2c082f51459f5f8f7a4d640ec93ee3a8da0a126f5effdbae174d7aaf71d2054eddee0854529
7
+ data.tar.gz: 98bdef30f3db77c15256ed2ef02e9b3550d8ed6d653e932f0550b35ba3b4f99bd899cedd518dd9a3e0e422ad07e232b2ee1eb1a3abfa2713927312a788c17ad5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab_quality-test_tooling (0.9.2)
4
+ gitlab_quality-test_tooling (0.9.3)
5
5
  activesupport (>= 6.1, < 7.1)
6
6
  gitlab (~> 4.19)
7
7
  http (~> 5.0)
@@ -38,9 +38,11 @@ module GitlabQuality
38
38
 
39
39
  def new_issue_description(test)
40
40
  super +
41
- <<~DESCRIPTION
41
+ <<~DESCRIPTION.chomp
42
42
  Slow tests were detected, please see the [test speed best practices guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#test-speed)
43
43
  to improve them. More context available about this issue in the [top slow tests guide](https://docs.gitlab.com/ee/development/testing_guide/best_practices.html#top-slow-tests).
44
+
45
+ Add `allowed_to_be_slow: true` to the RSpec test if this is a legit slow test and close the issue.
44
46
  DESCRIPTION
45
47
  end
46
48
 
@@ -59,7 +61,7 @@ module GitlabQuality
59
61
  end
60
62
 
61
63
  def should_create_slow_issue?(test)
62
- test.run_time > max_duration_for_test(test)
64
+ !test.allowed_to_be_slow? && test.run_time > max_duration_for_test(test)
63
65
  end
64
66
  end
65
67
  end
@@ -119,6 +119,10 @@ module GitlabQuality
119
119
  failures.any?
120
120
  end
121
121
 
122
+ def allowed_to_be_slow?
123
+ !!report['allowed_to_be_slow']
124
+ end
125
+
122
126
  private
123
127
 
124
128
  def quarantine
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GitlabQuality
4
4
  module TestTooling
5
- VERSION = "0.9.2"
5
+ VERSION = "0.9.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab_quality-test_tooling
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitLab Quality
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-20 00:00:00.000000000 Z
11
+ date: 2023-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: climate_control