Skip to content

Commit d94cfdc

Browse files
committed
debugging travis: need more output
1 parent 4477f9d commit d94cfdc

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

lib/mongo.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ defmodule Mongo do
188188
readConcern: opts[:read_concern]
189189
] |> filter_nils()
190190

191-
opts = Keyword.drop(opts, ~w(full_document resume_after start_at_operation_time start_after explain allow_disk_use collation bypass_document_validation hint comment read_concern)a)
191+
case opts[:debug] do
192+
true -> IO.puts inspect cmd
193+
_ -> nil
194+
end
195+
196+
opts = Keyword.drop(opts, ~w(full_document resume_after start_at_operation_time start_after explain allow_disk_use collation bypass_document_validation hint comment read_concern debug)a)
192197

193198
on_resume_token = on_resume_token || (fn _token -> nil end)
194199
change_stream_cursor(topology_pid, cmd, on_resume_token, opts)

test/mongo/change_stream_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule Mongo.ChangeStreamTest do
88
end
99

1010
def consumer_1(top, monitor) do
11-
cursor = Mongo.watch_collection(top, "users", [], fn doc -> send(monitor, {:token, doc}) end, max_time: 1_000 )
11+
cursor = Mongo.watch_collection(top, "users", [], fn doc -> send(monitor, {:token, doc}) end, max_time: 1_000, debug: true )
1212
result = cursor |> Enum.take(2) |> Enum.at(0)
1313
send(monitor, {:insert, result})
1414
end

0 commit comments

Comments
 (0)