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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21e474e889630431e22ad889a33194b4f2a0ae21f720563080416f2ef71c0037
|
|
4
|
+
data.tar.gz: 4f6de194f062b50efbfbb2629d23ca19ab7c1b2d3f5d0d467a4ed1ef6c4975fe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 413ae77a6c3b4b50a8217074a4ba61cf58df1f6d0c571c0012120569a813d74f7428a93787f93bf1cb74311bfc48c86c0eb7421da1865d788a3557c84ef740fc
|
|
7
|
+
data.tar.gz: 18e590e2ffa3d9fbb5ab47ce5e0ef8355d8f66e993fea3b1f9cc6dc40a8dca2434c85262476f327b6e9122b66b1080a447ecd49aafc00ac7d7733c12deb4a724
|
data/.semver
CHANGED
|
@@ -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
|
-
|
|
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
|
+
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-
|
|
11
|
+
date: 2023-09-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aruba
|