[CSHARP-2897] Compare server version numbers correctly in test projects Created: 14/Jan/20 Updated: 28/Oct/23 Resolved: 31/Jul/20 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Testing |
| Affects Version/s: | 2.10.0 |
| Fix Version/s: | 2.12.0 |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Robert Stam | Assignee: | Mikalai Mazurenka (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
According to the server versioning numbering scheme a version number like 4.3.0-2084-g6ef06c9 is NEWER than 4.3.0 (note: it's 2084 commits AFTER the release of 4.3.0, and is actually NOT a variant of 4.3.0 at all!). In our test projects we're using our SemanticVersion class to compare server version numbers, which interprets everything after the "-" as a pre-release name. And according to semantic versioning comparison rules all pre-releases of 4.3.0 are OLDER (not NEWER) than 4.3.0. So according to the server version number scheme: 4.3.0-2084-g6ef06c > 4.3.0 But according to the C# driver test code 4.3.0-2084-g6ef06c < 4.3.0 This could be causing us to execute or not execute certain version dependent tests incorrectly. We should add a new ServerVersion class that parses server version numbers and compares them correctly. |
| Comments |
| Comment by Githook User [ 31/Jul/20 ] |
|
Author: {'name': 'Mikalai Mazurenka', 'email': 'mikalai.mazurenka@mongodb.com', 'username': 'MikalaiMazurenka'}Message: |
| Comment by Robert Stam [ 24/Jul/20 ] |
|
As part of comparing server versions correctly let's also add special logic for comparing values like `rc2` and `rc10` so that `rc2` < `rc10`. |