Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
akash-akya committed Sep 20, 2024
1 parent 3cfe967 commit d0b2a94
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/ex_cmd/process_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ defmodule ExCmd.ProcessTest do
assert os_process_alive?(os_pid)

# ensure the script set the correct signal handlers (handlers to ignore signal)
assert {:ok, "ignored signals\n"} = Process.read(s)
assert {:ok, "ignored signals\n" <> _} = Process.read(s)

# exit without waiting for the exile process
{os_pid, s}
Expand Down Expand Up @@ -271,7 +271,9 @@ defmodule ExCmd.ProcessTest do

test "check command that does not take any input or produce output" do
{:ok, s} = Process.start_link(["sh", "-c", "./forever.sh"])
assert {:error, :killed} == Process.await_exit(s)
assert ret = Process.await_exit(s)
# process might die with different reason due to race condition
assert ret in [{:error, :killed}, {:ok, 127}]
end

test "writing binary larger than pipe buffer size" do
Expand Down

0 comments on commit d0b2a94

Please sign in to comment.