nats-async 0.1.3 → 0.1.4
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 +4 -4
- data/lib/version.rb +1 -1
- data/spec/examples_spec.rb +12 -16
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6553bb8adf02cd233df4cc933e2105b5ef5c2be79b55872b66143f01d8162890
|
|
4
|
+
data.tar.gz: a0fee08a18816390e046ca7dca4d1763e884584146b5939abc1af2b37aaacdf4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e8034ee55ee0f575a42890e0f882286bed6c8db5598511c566d754afb6e87ffd624008c99c073074f28f079f100f0e3c35daface6f07d4c83b115119b3a9ad5e
|
|
7
|
+
data.tar.gz: e3f757abed15e89ccc47ce6d59ad147dc99779522ce56673958270beba773a17394feff856839d958f0cb246f8bc4776e9c8a0ed5c6c435c8a331f6cacd3d5ea
|
data/lib/version.rb
CHANGED
data/spec/examples_spec.rb
CHANGED
|
@@ -11,20 +11,6 @@ require "tempfile"
|
|
|
11
11
|
require "tmpdir"
|
|
12
12
|
|
|
13
13
|
RSpec.describe "example scripts" do
|
|
14
|
-
def report_server_start_failure(reason, log_path)
|
|
15
|
-
log = File.exist?(log_path) ? File.read(log_path) : "(log file missing)"
|
|
16
|
-
message = <<~MSG
|
|
17
|
-
nats-server example integration skipped: #{reason}
|
|
18
|
-
--- nats-server log ---
|
|
19
|
-
#{log}
|
|
20
|
-
--- end nats-server log ---
|
|
21
|
-
MSG
|
|
22
|
-
|
|
23
|
-
warn(message)
|
|
24
|
-
warn("::warning::#{message.gsub("\n", "%0A")}") if ENV["GITHUB_ACTIONS"] == "true"
|
|
25
|
-
skip(message)
|
|
26
|
-
end
|
|
27
|
-
|
|
28
14
|
def project_path = File.expand_path("..", __dir__)
|
|
29
15
|
def server_path = File.join(project_path, "bin", "nats-server")
|
|
30
16
|
|
|
@@ -44,11 +30,21 @@ RSpec.describe "example scripts" do
|
|
|
44
30
|
return
|
|
45
31
|
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
|
|
46
32
|
if Process.waitpid(server_pid, Process::WNOHANG)
|
|
47
|
-
|
|
33
|
+
raise <<~MSG
|
|
34
|
+
bundled nats-server exited before becoming ready
|
|
35
|
+
--- nats-server log ---
|
|
36
|
+
#{File.exist?(log_path) ? File.read(log_path) : "(log file missing)"}
|
|
37
|
+
--- end nats-server log ---
|
|
38
|
+
MSG
|
|
48
39
|
end
|
|
49
40
|
|
|
50
41
|
if Process.clock_gettime(Process::CLOCK_MONOTONIC) >= deadline
|
|
51
|
-
|
|
42
|
+
raise <<~MSG
|
|
43
|
+
bundled nats-server did not start on port #{port}
|
|
44
|
+
--- nats-server log ---
|
|
45
|
+
#{File.exist?(log_path) ? File.read(log_path) : "(log file missing)"}
|
|
46
|
+
--- end nats-server log ---
|
|
47
|
+
MSG
|
|
52
48
|
end
|
|
53
49
|
|
|
54
50
|
sleep 0.1
|