Skip to content

Commit 3481151

Browse files
committed
Fix EBADF test to catch any of the possible messages
1 parent 7c2b542 commit 3481151

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

test/runtests.jl

+2-6
Original file line numberDiff line numberDiff line change
@@ -611,16 +611,12 @@ end
611611
close(Base.Libc.FILE(LibPQ.socket(conn), "r")) # close socket
612612
LibPQ._connect_poll(conn, Timer(0), 0)
613613

614-
errs = map(LibPQ.Errors.PQConnectionError, [
615-
"could not receive data from server: Bad file descriptor\n",
616-
"could not get socket error status: Bad file descriptor\n",
617-
])
618-
619614
try
620615
LibPQ.handle_new_connection(LibPQ.Connection(conn))
621616
@test false
622617
catch err
623-
@test err in errs
618+
@test err isa LibPQ.Errors.PQConnectionError
619+
@test occursin("Bad file descriptor", sprint(show, err))
624620
end
625621
end
626622
end

0 commit comments

Comments
 (0)