Skip to content

Commit 90f9ab8

Browse files
committed
feat: Use github actions
1 parent 9510055 commit 90f9ab8

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

lib/mongo/session.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ defmodule Mongo.Session do
661661
|> filter_nils()
662662

663663
case Mongo.exec_command(conn, cmd, database: "admin") do
664-
{:ok, _doc} -> :ok
664+
{:ok, _doc} ->
665+
:ok
666+
665667
{:error, error} ->
666668
timeout = opts[:transaction_retry_timeout_s] || @retry_timeout_seconds
667669
try_again = Error.has_label(error, "UnknownTransactionCommitResult") && DateTime.diff(DateTime.utc_now(), time, :second) < timeout

lib/mongo/topology.ex

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,11 @@ defmodule Mongo.Topology do
407407
{:ok, {address, _opts}} ->
408408
case get_connection(address, state) do
409409
{:ok, connection} ->
410-
{:reply, {:ok, connection}, state}
410+
{:reply, {:ok, connection}, state}
411+
411412
## in case of an error, just return the error
412-
error -> {:reply, error, state}
413+
error ->
414+
{:reply, error, state}
413415
end
414416

415417
## in case of an error, just return the error

test/bson_test.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ defmodule BSONTest do
1717
@bin_3 <<32, 0, 0, 0, 3, 97, 0, 24, 0, 0, 0, 3, 98, 0, 5, 0, 0, 0, 0, 3, 99, 0, 8, 0, 0, 0, 10, 100, 0, 0, 0, 0>>
1818

1919
@map_4 %{"a" => [], "b" => [1, 2, 3], "c" => [1.1, "2", true]}
20-
@bin_4 <<74, 0, 0, 0, 4, 97, 0, 5, 0, 0, 0, 0, 4, 98, 0, 26, 0, 0, 0, 16, 48, 0, 1, 0, 0, 0, 16, 49, 0, 2, 0, 0, 0, 16, 50, 0, 3, 0, 0, 0, 0, 4, 99, 0, 29, 0, 0, 0, 1, 48, 0, 154, 153, 153, 153, 153, 153, 241, 63, 2, 49, 0, 2, 0, 0, 0, 50, 0, 8, 50,
21-
0, 1, 0, 0>>
20+
@bin_4 <<74, 0, 0, 0, 4, 97, 0, 5, 0, 0, 0, 0, 4, 98, 0, 26, 0, 0, 0, 16, 48, 0, 1, 0, 0, 0, 16, 49, 0, 2, 0, 0, 0, 16, 50, 0, 3, 0, 0, 0, 0, 4, 99, 0, 29, 0, 0, 0, 1, 48, 0, 154, 153, 153, 153, 153, 153, 241, 63, 2, 49, 0, 2, 0, 0, 0, 50, 0, 8,
21+
50, 0, 1, 0, 0>>
2222

2323
@map_5 %{"a" => 123.0}
2424
@bin_5 <<16, 0, 0, 0, 1, 97, 0, 0, 0, 0, 0, 0, 192, 94, 64, 0>>

test/support/test_connection.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
defmodule Mongo.TestConnection do
22
@moduledoc false
33

4-
@seeds ["127.0.0.1:27017"] ## todo , "127.0.0.1:27018", "127.0.0.1:27019"]
4+
## todo , "127.0.0.1:27018", "127.0.0.1:27019"]
5+
@seeds ["127.0.0.1:27017"]
56

67
def connect() do
78
Mongo.start_link(database: "mongodb_test", seeds: @seeds, show_sensitive_data_on_connection_error: true)

0 commit comments

Comments
 (0)