Skip to content

Commit 23a5677

Browse files
committed
feat: Exclude rs_required test units
1 parent 4fd9d22 commit 23a5677

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

.github/workflows/mongodb_driver.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
run: mix deps.get
5050

5151
- name: Run tests
52-
run: mix test --exclude ssl --exclude socket
52+
run: mix test --exclude ssl --exclude socket --exclude rs_required
5353

5454
- name: Run Credo
5555
run: mix credo

test/mongo/session_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ defmodule Mongo.SessionTest do
340340
assert {:ok, 0} == Mongo.count(top, coll, %{})
341341
end
342342

343-
@tag :mongo_4_2
343+
@tag :rs_required
344344
test "check invalid unordered bulk with transaction", %{top: top} do
345345
coll = unique_collection()
346346

test/mongo/topology_test.exs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ defmodule Mongo.TopologyTest do
88
end
99

1010
@modes [:secondary, :secondary_preferred, :primary, :primary_preferred]
11+
12+
@tag :rs_required
1113
test "replica set selection", %{pid: mongo_pid} do
1214
for mode <- @modes do
1315
assert {:ok, %Mongo.InsertOneResult{inserted_id: new_id}} = Mongo.insert_one(mongo_pid, "test", %{topology_test: 1}, w: 3)

test/mongo/transaction_retries_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ defmodule Mongo.TransactionRetriesTest do
33

44
alias Mongo.Session
55

6+
@tag :rs_required
67
test "transaction returns an error", %{pid: top} do
78
coll = unique_collection()
89

@@ -27,7 +28,7 @@ defmodule Mongo.TransactionRetriesTest do
2728
assert :ok == Session.end_session(top, session)
2829
end
2930

30-
@tag :mongo_4_3
31+
@tag :rs_required
3132
test "transaction retry", %{pid: top, catcher: catcher} do
3233
coll = unique_collection()
3334

@@ -53,6 +54,7 @@ defmodule Mongo.TransactionRetriesTest do
5354
assert [:commitTransaction, :configureFailPoint, :insert, :create] = get_succeeded_events(catcher)
5455
end
5556

57+
@tag :rs_required
5658
test "with_transaction, return an error", %{pid: top} do
5759
coll = unique_collection()
5860

@@ -76,6 +78,7 @@ defmodule Mongo.TransactionRetriesTest do
7678
end)
7779
end
7880

81+
@tag :rs_required
7982
test "with_transaction, retry commit", %{pid: top} do
8083
coll = unique_collection()
8184

@@ -99,6 +102,7 @@ defmodule Mongo.TransactionRetriesTest do
99102
end)
100103
end
101104

105+
@tag :rs_required
102106
test "with_transaction, retry commit timeout", %{pid: top, catcher: catcher} do
103107
coll = unique_collection()
104108

@@ -128,6 +132,7 @@ defmodule Mongo.TransactionRetriesTest do
128132
assert [:configureFailPoint, :abortTransaction, :configureFailPoint, :insert, :create] = get_succeeded_events(catcher)
129133
end
130134

135+
@tag :rs_required
131136
test "with_transaction, retry transaction timeout", %{pid: top, catcher: catcher} do
132137
coll = unique_collection()
133138

test/support/collection_case.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ defmodule CollectionCase do
33

44
use ExUnit.CaseTemplate
55

6-
@seeds ["127.0.0.1:27017"] ## todo , "127.0.0.1:27018", "127.0.0.1:27019"]
6+
## todo , "127.0.0.1:27018", "127.0.0.1:27019"]
7+
@seeds ["127.0.0.1:27017"]
78

89
setup_all do
910
assert {:ok, pid} = Mongo.start_link(database: "mongodb_test", seeds: @seeds, show_sensitive_data_on_connection_error: true)

0 commit comments

Comments
 (0)