[JAVA-4251] Stop skipping tests unnecessarily Created: 21/Jul/21  Updated: 28/Oct/23  Resolved: 27/Jul/21

Status: Closed
Project: Java Driver
Component/s: Test Coverage
Affects Version/s: None
Fix Version/s: 4.4.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Documentation Changes: Not Needed

 Description   

There is a bug in the logic of ClusterFixture.serverVersionGreaterThan. If you pass it a string like "5.0". it will parse it and then create the ServerVersion instance with [5, 0, 0] and compare it against the actual server version. But once the first 5.0 patch release is out, a test with {{@IgnoreIf({ serverVersionGreaterThan('5.0') }) }} will be incorrectly skipped when running against a 5.0.1 server. The intention is that the test is only skipped when running against the next minor release, e.g. 5.1.*.



 Comments   
Comment by Githook User [ 27/Jul/21 ]

Author:

{'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}

Message: Fix and simplify server version checking for test runners

  • Standardized on two methods for checking server version and removed the others.
    The methods both take just major and minor version as their two arguments. The
    two remaining methods are serverVersionAtLeast and serverVersionLessThan.
  • Simplified usage of these methods in tests. Replaced double negatives by
    reversing the condition.
  • Fixed a bug in the comparison logic which caused us to skip tests that shouldn't
    be fixed.
  • Replaced references to development versions (e.g. 4.1) with supported versions

JAVA-4251
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/6edf53919de00da5865a48ceab481f243508b337

Generated at Thu Feb 08 09:01:35 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.