freshli-commons 0.6.4 → 0.6.5

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: d95cfbbcfd1f22a42fd6d51c485eba7d06fe0a92a813df113de230a53983c9b8
4
- data.tar.gz: 87fd47d927a2c0a9eadd6d9a2f1fea52ddeca1e825fad10c7f5237b0b7da5472
3
+ metadata.gz: 21e474e889630431e22ad889a33194b4f2a0ae21f720563080416f2ef71c0037
4
+ data.tar.gz: 4f6de194f062b50efbfbb2629d23ca19ab7c1b2d3f5d0d467a4ed1ef6c4975fe
5
5
  SHA512:
6
- metadata.gz: 999ee8589980e249c8c6f7eb8f0abd35979dc6c9b5401de2276542f8dade867f140bf608f4c55b10ca16799abe69f66b81ee3e19ab426af70e947005069fa66f
7
- data.tar.gz: fe6e596e37061fae93c278aff9b7d2974e365f65cd15751a9261f18618d7ddde8a584b3d92547d4af3661679ec268fe0dac5c87fcbb5c08e7296fed1a5118529
6
+ metadata.gz: 413ae77a6c3b4b50a8217074a4ba61cf58df1f6d0c571c0012120569a813d74f7428a93787f93bf1cb74311bfc48c86c0eb7421da1865d788a3557c84ef740fc
7
+ data.tar.gz: 18e590e2ffa3d9fbb5ab47ce5e0ef8355d8f66e993fea3b1f9cc6dc40a8dca2434c85262476f327b6e9122b66b1080a447ecd49aafc00ac7d7733c12deb4a724
data/.semver CHANGED
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 6
4
- :patch: 4
4
+ :patch: 5
5
5
  :special: ''
6
6
  :metadata: ''
@@ -104,11 +104,15 @@ module Corgibytes
104
104
  # rubocop:disable Metrics/MethodLength
105
105
  def wait_until_running!
106
106
  Timeout.timeout(5) do
107
+ attempts = 0
107
108
  loop do
109
+ attempts += 1
110
+ yield(attempts) if block_given?
111
+
108
112
  status = nil
109
113
  begin
110
114
  status = health_check
111
- rescue GRPC::Unavailable
115
+ rescue GRPC::Unavailable, GRPC::NotFound
112
116
  status = nil
113
117
  end
114
118
 
@@ -15,7 +15,9 @@ Then('the freshli_agent.proto gRPC service is running on port {int}') do |port|
15
15
  end
16
16
 
17
17
  When('I wait for the freshli_agent.proto gRPC service to be running on port {int}') do |port|
18
- GrpcClient.new(port).wait_until_running!
18
+ GrpcClient.new(port).wait_until_running! do |attempts|
19
+ log("Checking gRPC service health. Attempt ##{attempts}.")
20
+ end
19
21
  end
20
22
 
21
23
  When('the gRPC service on port {int} is sent the shutdown command') do |port|
@@ -23,7 +25,10 @@ When('the gRPC service on port {int} is sent the shutdown command') do |port|
23
25
  end
24
26
 
25
27
  Then('there are no services running on port {int}') do |port|
26
- expect(Ports.available?(port) { |attempts| log(attempts) }).to be_truthy
28
+ is_port_available = Ports.available?(port) do |attempts|
29
+ log("Checking port availability. Attempt ##{attempts}.")
30
+ end
31
+ expect(is_port_available).to be_truthy
27
32
  end
28
33
 
29
34
  test_services = TestServices.new
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: freshli-commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - M. Scott Ford
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-08-30 00:00:00.000000000 Z
11
+ date: 2023-09-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aruba