• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

efcasado / off_broadway_pulsar / 2b94d2493f33c1abe4748e6ac5a76b88bdcb56b0-PR-29

18 Dec 2025 07:30PM UTC coverage: 88.43%. First build
2b94d2493f33c1abe4748e6ac5a76b88bdcb56b0-PR-29

Pull #29

github

efcasado
chore: add basic integration tests
Pull Request #29: chore: add basic integration tests

34 of 37 new or added lines in 3 files covered. (91.89%)

107 of 121 relevant lines covered (88.43%)

313.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

91.67
/test/support/system.ex
1
defmodule OffBroadwayPulsar.Test.Support.System do
2
  @moduledoc """
3
  Helper functions for managing the test environment (i.e. Pulsar).
4
  """
5

6
  def start_pulsar do
7
    IO.puts("Starting Pulsar...")
1✔
8
    {_output, 0} = System.cmd("docker", ["compose", "up", "-d"])
1✔
9

10
    IO.puts("Waiting for Pulsar to become healthy...")
1✔
11
    wait_for_pulsar()
1✔
12
  end
13

14
  def stop_pulsar do
15
    IO.puts("Stopping Pulsar...")
1✔
16
    {_output, 0} = System.cmd("docker", ["compose", "down", "-v"])
1✔
17
  end
18

19
  defp wait_for_pulsar(retries \\ 30) do
20
    if retries == 0 do
7✔
NEW
21
      raise "Pulsar failed to become healthy"
×
22
    end
23

24
    case System.cmd("curl", ["-f", "http://localhost:8080/metrics/health"], stderr_to_stdout: true) do
7✔
25
      {_output, 0} ->
26
        IO.puts("Pulsar is healthy!")
1✔
27
        :ok
28

29
      {_output, _code} ->
30
        Process.sleep(1000)
6✔
31
        wait_for_pulsar(retries - 1)
6✔
32
    end
33
  end
34
end
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc