Skip to content
This repository was archived by the owner on Dec 22, 2021. It is now read-only.

Conversation

@TBSliver
Copy link
Contributor

@TBSliver TBSliver commented Aug 1, 2018

Contains the fixes for SDAM spec tests as well. Issues where:

  • Case insensitive matching of is_master.me value to address
  • Servers providing no min/max wire version where incorrectly coming back as compatible (according to too_old.yml tests)
  • Not checking compatibility value from yml tests

One thing that isnt in this one, is there is a monitoring folder for the SDAM spec tests repo - are these implemented elsewhere or do these need doing?

@coveralls
Copy link

coveralls commented Aug 1, 2018

Coverage Status

Coverage remained the same at 74.659% when pulling 4a2adf0 on shadow-dot-cat:TBSliver/PERL-806 into 232b626 on mongodb:master.

t/sdam_spec.t Outdated

while ( my $path = $iterator->() ) {
next unless -f $path && $path =~ /\.json$/;
#next unless $path =~ /too_old/;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stray comment. :-)

But in the case of the /too_old/ test, we should just fiddle the compatible result to 'true' somewhere later in this test runner so we can make sure it actually works.

is($topology->replica_set_name, $expected_set_name, 'correct setName for topology');
is($topology->type, $outcome->{'topologyType'}, 'correct topology type');
is($topology->logical_session_timeout_minutes, $outcome->{'logicalSessionTimeoutMinutes'}, 'correct ls timeout');
if ( defined $outcome->{'compatible'} ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, if it's the /too_old/ test file then we want to force the compatibility expectation to true. (Along with a comment that Perl has to support older servers.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, have done so :)


$server_max_wire_version = 0 unless defined $server_max_wire_version;
$server_min_wire_version = 0 unless defined $server_min_wire_version;
# set to -1 as could be undefined, or 0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should stay "0" because missing is equivalent to wire version "0" and we don't need it to force the compatibility logic to fail, as the Perl driver is special and has to deviate from the spec and support older versions (because of some large customers that asked for legacy support).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right ok, have modified it back to the original version but put a comment specifically about that so it doesnt get done again heh

Copy link
Contributor

@xdg xdg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@xdg
Copy link
Contributor

xdg commented Aug 28, 2018

Rebased and merged as 588bcaa

@xdg xdg closed this Aug 28, 2018
@TBSliver TBSliver deleted the TBSliver/PERL-806 branch September 14, 2018 14:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants