parallel_report_portal 2.0.3 → 2.1.1

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: 145afd41ab4f1c21dff64f431a1abd47e2f0b94f492b94f0be13c09717d0b5ae
4
- data.tar.gz: 7cf7ddcaad82438d5208222341ca067d80fa60e9b2f0b947060b0ccf25121303
3
+ metadata.gz: 10a0ede4e1da6f5fc4788775483996e7ecf4a21009b06bfbbec5b49593c623bc
4
+ data.tar.gz: 8a0f3966ac4134f96e4a18e42e4b779943425d5d7cf9947dfc6afa10ee376859
5
5
  SHA512:
6
- metadata.gz: 3019ba93923d3e486ee944eda901992f3b58b9a6f09a0824c28ab11f02c5d9e68893d79844d92cfee3db16a8e4d34d99849c8e90b7a1dc9d1cd8b3ffde72bf8b
7
- data.tar.gz: e512e9ecdcfe469f75cf90065ac2021c1c5bfd47f1f32b237f6cbede8ab4cc98af4601bd456689b88f0ed456a4083ed457df4da51ef8cd08fbd5979e94779f7d
6
+ metadata.gz: 380772393a3450a86df43444caa69e09b93d5b9b88a66ea658adc0baac40b064fe74e299cdec0dbf99c299a295c2d550914040ae87a65d82458c801e9f94ca2d
7
+ data.tar.gz: 5950fe72eb47bf2c195621d94faac14cfbb7a17b73aeae16f02a952b01a475f86e6a0901a8113ad7f00dd9d5081f5b162fd51266424cf5b7d6070b65162d3a5c
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  This gem is a Ruby-Cucumber formatter which sends the test output to [Report Portal](https://reportportal.io).
4
4
 
5
- This formatter supports plain 'ol Cucumber tests and those wrapped with [parallel_tests](https://rubygems.org/gems/parallel_tests).
5
+ This formatter supports plain 'ol Cucumber tests and those wrapped with [parallel_tests](https://rubygems.org/gems/parallel_tests).
6
6
 
7
7
  It also supports Cucumber 3.x and 4+ (Cucumber implementations using cucumber-messages).
8
8
 
@@ -30,20 +30,30 @@ The formatter supports configuration via a config file or via environment variab
30
30
 
31
31
  #### Configuration file
32
32
 
33
- It will search for a file called `report_portal.yml` or `REPORT_PORTAL.YML` in `./config` and `./`. It expects this file to contain the standard Report Portal configuration options -- see the Report Portal documentation. Optionally, the config file keys may match those accepted through environment variables -- they may contain 'rp_' and 'RP_'.
33
+ It will search for a file called `report_portal.yml` or `REPORT_PORTAL.YML` in `./config` and `./`. It expects this file to contain the standard Report Portal configuration options -- see the Report Portal documentation. Optionally, the config file keys may match those accepted through environment variables -- they may contain 'rp*' and 'RP*'.
34
+
35
+ #### Configurable Timeouts
36
+
37
+ When running in parallel you might encounter some connection timeouts and these have been made configurable. You can configure the Report Portal yaml file with these attributes and set your own custom timeout values.
38
+
39
+ ```yaml
40
+ idle_timeout: 100
41
+ open_timeout: 60
42
+ read_timeout: 60
43
+ ```
34
44
 
35
45
  #### Environment variables
36
46
 
37
47
  It will search for the following environment variables which may be in upper or lowercase (the official client defers to lower case, this is available here for compatibility).
38
48
 
39
- * `RP_UUID` - the user's UUID for this Report Portal instance which must be created in advance
40
- * `RP_ENDPOINT` - the endpoint for this Report Portal instance
41
- * `RP_PROJECT` - the Report Portal project name which must be created in advance and this user added as a member
42
- * `RP_LAUNCH` - the name of this 'launch'
43
- * `RP_DEBUG` - *optional* if set to the string value `true` it will instruct Report Portal to add the output of these tests to the debug tab
44
- * `RP_DESCRIPTION` - *optional* a textual description of the launch
45
- * `RP_TAGS` - *optional* a string of comma separated tags
46
- * `RP_ATTRIBUTES` - *optional* a string of comma separated attributes
49
+ - `RP_UUID` - the user's UUID for this Report Portal instance which must be created in advance
50
+ - `RP_ENDPOINT` - the endpoint for this Report Portal instance
51
+ - `RP_PROJECT` - the Report Portal project name which must be created in advance and this user added as a member
52
+ - `RP_LAUNCH` - the name of this 'launch'
53
+ - `RP_DEBUG` - _optional_ if set to the string value `true` it will instruct Report Portal to add the output of these tests to the debug tab
54
+ - `RP_DESCRIPTION` - _optional_ a textual description of the launch
55
+ - `RP_TAGS` - _optional_ a string of comma separated tags
56
+ - `RP_ATTRIBUTES` - _optional_ a string of comma separated attributes
47
57
 
48
58
  ### With cucumber
49
59
 
@@ -61,9 +71,7 @@ cucumber -f ParallelReportPortal::Cucumber::Formatter --out /dev/null -f progres
61
71
 
62
72
  ```
63
73
  parallel_cucumber -- -f ParallelReportPortal::Cucumber::Formatter -- features/
64
- ```
65
-
66
-
74
+ ```
67
75
 
68
76
  ## Development
69
77
 
@@ -22,7 +22,7 @@ module ParallelReportPortal
22
22
  # RP_TAGS:: A set of tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of tags
23
23
  # RP_ATTRIBUTES:: A set of attribute tags to pass to Report Portal for this launch. If these are set via an environment variable, provide a comma-separated string of attributes
24
24
  class Configuration
25
- ATTRIBUTES = [:uuid, :endpoint, :project, :launch, :debug, :description, :tags, :attributes]
25
+ ATTRIBUTES = [:uuid, :endpoint, :project, :launch, :debug, :description, :tags, :attributes, :open_timeout, :idle_timeout, :read_timeout]
26
26
 
27
27
  # @return [String] the Report Portal user UUID
28
28
  attr_accessor :uuid
@@ -45,6 +45,12 @@ module ParallelReportPortal
45
45
  # @return [Array<String>] an array of attributes to attach to this launch
46
46
  # (Report Portal 5)
47
47
  attr_reader :attributes
48
+ # @return [Integer] the number of seconds for the open connection to timeout
49
+ attr_accessor :open_timeout
50
+ # @return [Integer] the number of seconds for the open and idle connection to timeout
51
+ attr_accessor :idle_timeout
52
+ # @return [Integer] the number of seconds for the read connection to timeout
53
+ attr_accessor :read_timeout
48
54
 
49
55
 
50
56
  # Create an instance of Configuration.
@@ -95,6 +101,12 @@ module ParallelReportPortal
95
101
  end
96
102
  end
97
103
 
104
+ # Simple method to obtain an attribute from this class or set default value
105
+ # param [symbol] a symbol version of the attribute
106
+ def fetch(key, default_value)
107
+ self.send(key).nil? ? default_value : self.send(key)
108
+ end
109
+
98
110
  # Sets the attributes for the launch. If an array is provided, the array is used,
99
111
  # if a string is provided, the string is broken into components by splitting
100
112
  # on a comma.
@@ -39,7 +39,9 @@ module ParallelReportPortal
39
39
  }
40
40
  ) do |f|
41
41
  f.adapter :net_http_persistent, pool_size: 5 do |http|
42
- http.idle_timeout = 100
42
+ http.idle_timeout = ParallelReportPortal.configuration.fetch(:idle_timeout, 100)
43
+ http.open_timeout = ParallelReportPortal.configuration.fetch(:open_timeout, 60)
44
+ http.read_timeout = ParallelReportPortal.configuration.fetch(:read_timeout, 60)
43
45
  end
44
46
  end
45
47
  end
@@ -60,7 +62,9 @@ module ParallelReportPortal
60
62
  conn.request :url_encoded
61
63
  conn.adapter :net_http_persistent, pool_size: 5 do |http|
62
64
  # yields Net::HTTP::Persistent
63
- http.idle_timeout = 100
65
+ http.idle_timeout = ParallelReportPortal.configuration.fetch(:idle_timeout, 100)
66
+ http.open_timeout = ParallelReportPortal.configuration.fetch(:open_timeout, 60)
67
+ http.read_timeout = ParallelReportPortal.configuration.fetch(:read_timeout, 60)
64
68
  end
65
69
  end
66
70
  end
@@ -1,3 +1,3 @@
1
1
  module ParallelReportPortal
2
- VERSION = "2.0.3"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parallel_report_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nigel Brookes-Thomas
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2021-08-26 00:00:00.000000000 Z
12
+ date: 2022-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: appraisal
@@ -234,7 +234,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
234
234
  - !ruby/object:Gem::Version
235
235
  version: '0'
236
236
  requirements: []
237
- rubygems_version: 3.2.22
237
+ rubygems_version: 3.2.3
238
238
  signing_key:
239
239
  specification_version: 4
240
240
  summary: Run Cucumber Tests in parallel and with Cucumber 3 and 4+