@@ -358,18 +358,11 @@ describe('Client Metadata Update Prose Tests', function () {
358
358
// (Note os is the only one getting set in these tests)
359
359
expect ( updatedClientMetadata . os ) . to . deep . equal ( initialClientMetadata . os ) ;
360
360
} ) ;
361
-
362
- it ( 'does not append duplicate metadata for the same name' , async function ( ) {
363
- client . appendMetadata ( { name, version, platform } ) ;
364
- client . appendMetadata ( { name, version, platform } ) ;
365
- await client . db ( 'test' ) . command ( { ping : 1 } ) ;
366
- expect ( updatedClientMetadata . driver . name ) . to . not . contain ( '|framework|framework' ) ;
367
- } ) ;
368
361
} ) ;
369
362
}
370
363
} ) ;
371
364
372
- describe ( 'Test 3: Multiple Successive Metadata Updates with Identical/Partially Identical `DriverInfo` ' , function ( ) {
365
+ describe ( 'Test 3: Multiple Successive Metadata Updates with Duplicate Data ' , function ( ) {
373
366
const originalDriverInfo = { name : 'library' , version : '1.2' , platform : 'Library Platform' } ;
374
367
let initialClientMetadata : ClientMetadata ;
375
368
let updatedClientMetadata : ClientMetadata ;
@@ -386,7 +379,6 @@ describe('Client Metadata Update Prose Tests', function () {
386
379
// | 5 | framework | 2.0 | Library Platform |
387
380
// | 6 | framework | 1.2 | Framework Platform |
388
381
// | 7 | library | 2.0 | Framework Platform |
389
- // | 8 | framework | 2.0 | Framework Platform |
390
382
const tests = [
391
383
{ testCase : 1 , name : 'library' , version : '1.2' , platform : 'Library Platform' } ,
392
384
{ testCase : 2 , name : 'framework' , version : '1.2' , platform : 'Library Platform' } ,
@@ -642,7 +634,7 @@ describe('Client Metadata Update Prose Tests', function () {
642
634
await client . close ( ) ;
643
635
} ) ;
644
636
645
- it ( 'appends the metadata' , async function ( ) {
637
+ it ( 'does not append the duplicate metadata' , async function ( ) {
646
638
// 5. Append the following `DriverInfoOptions` to the `MongoClient` metadata:
647
639
// | Field | Value |
648
640
// | -------- | ---------------- |
@@ -661,7 +653,7 @@ describe('Client Metadata Update Prose Tests', function () {
661
653
} ) ;
662
654
663
655
describe ( 'Test 6: Metadata is not appended if identical to initial metadata (separated by non-identical metadata)' , function ( ) {
664
- let initialClientMetadata : ClientMetadata ;
656
+ let clientMetadata : ClientMetadata ;
665
657
let updatedClientMetadata : ClientMetadata ;
666
658
// TODO(NODE-6599): mongodb-legacy adds additional client metadata, breaking these prose tests
667
659
let client : RawMongoClient ;
@@ -718,8 +710,8 @@ describe('Client Metadata Update Prose Tests', function () {
718
710
const command = Connection . prototype . command . wrappedMethod . bind ( this ) ;
719
711
720
712
if ( cmd . hello || cmd [ LEGACY_HELLO_COMMAND ] ) {
721
- if ( ! initialClientMetadata ) {
722
- initialClientMetadata = cmd . client ;
713
+ if ( ! clientMetadata ) {
714
+ clientMetadata = cmd . client ;
723
715
} else {
724
716
updatedClientMetadata = cmd . client ;
725
717
}
@@ -748,7 +740,7 @@ describe('Client Metadata Update Prose Tests', function () {
748
740
await client . db ( 'test' ) . command ( { ping : 1 } ) ;
749
741
750
742
// 11. Assert that `clientMetadata` is identical to `updatedClientMetadata`.
751
- expect ( updatedClientMetadata ) . to . deep . equal ( initialClientMetadata ) ;
743
+ expect ( updatedClientMetadata ) . to . deep . equal ( clientMetadata ) ;
752
744
} ) ;
753
745
} ) ;
754
746
0 commit comments