Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Commit 9f90cc3

Browse files
committed
minor: tweak write concern test to pass on 4.4
1 parent 3f4c9e3 commit 9f90cc3

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

‎devel/config/replicaset-4.4.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
type: replica
3+
setName: foo
4+
default_args: -v --bind_ip 0.0.0.0 --enableMajorityReadConcern --quiet
5+
default_version: v4.4
6+
mongod:
7+
- name: host1
8+
- name: host2
9+
- name: host3
10+
11+
# vim: ts=4 sts=4 sw=4 et:

‎t/collection.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ subtest get_namespace => sub {
124124
subtest write_concern => sub {
125125
my $c;
126126

127-
ok( $c = $testdb->get_collection( 'foo', { write_concern => { w => 999 } } ),
128-
"get collection with w=999" );
127+
ok( $c = $testdb->get_collection( 'foo', { write_concern => { w => 50 } } ),
128+
"get collection with w=50" );
129129
my $err = exception { $c->insert_one( { _id => 1 } ) };
130130
ok(ref $err && $err->isa('MongoDB::DatabaseError'),
131131
"collection-level write concern applies to insert_one"
@@ -979,7 +979,7 @@ subtest "bulk_write writeConcern used" => sub {
979979
like exception {
980980
$coll->bulk_write(
981981
[insert_one => [{ x => 3 }]],
982-
{ writeConcern => { w => 999 } },
982+
{ writeConcern => { w => 50 } },
983983
);
984984
}, qr/WriteConcernError/, 'write concern is taken into account';
985985
};

‎t/crud.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -878,7 +878,7 @@ subtest "write concern errors" => sub {
878878
unless $server_type eq 'RSPrimary';
879879

880880
$coll->drop;
881-
my $coll2 = $coll->clone( write_concern => { w => 99 } );
881+
my $coll2 = $coll->clone( write_concern => { w => 50 } );
882882

883883
my @cases = (
884884
[ insert_one => [ { x => 1 } ] ],

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /