@@ -358,18 +358,11 @@ describe('Client Metadata Update Prose Tests', function () {
358358 // (Note os is the only one getting set in these tests)
359359 expect ( updatedClientMetadata . os ) . to . deep . equal ( initialClientMetadata . os ) ;
360360 } ) ;
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- } ) ;
368361 } ) ;
369362 }
370363 } ) ;
371364
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 ( ) {
373366 const originalDriverInfo = { name : 'library' , version : '1.2' , platform : 'Library Platform' } ;
374367 let initialClientMetadata : ClientMetadata ;
375368 let updatedClientMetadata : ClientMetadata ;
@@ -386,7 +379,6 @@ describe('Client Metadata Update Prose Tests', function () {
386379 // | 5 | framework | 2.0 | Library Platform |
387380 // | 6 | framework | 1.2 | Framework Platform |
388381 // | 7 | library | 2.0 | Framework Platform |
389- // | 8 | framework | 2.0 | Framework Platform |
390382 const tests = [
391383 { testCase : 1 , name : 'library' , version : '1.2' , platform : 'Library Platform' } ,
392384 { testCase : 2 , name : 'framework' , version : '1.2' , platform : 'Library Platform' } ,
@@ -642,7 +634,7 @@ describe('Client Metadata Update Prose Tests', function () {
642634 await client . close ( ) ;
643635 } ) ;
644636
645- it ( 'appends the metadata' , async function ( ) {
637+ it ( 'does not append the duplicate metadata' , async function ( ) {
646638 // 5. Append the following `DriverInfoOptions` to the `MongoClient` metadata:
647639 // | Field | Value |
648640 // | -------- | ---------------- |
@@ -661,7 +653,7 @@ describe('Client Metadata Update Prose Tests', function () {
661653 } ) ;
662654
663655 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 ;
665657 let updatedClientMetadata : ClientMetadata ;
666658 // TODO(NODE-6599): mongodb-legacy adds additional client metadata, breaking these prose tests
667659 let client : RawMongoClient ;
@@ -718,8 +710,8 @@ describe('Client Metadata Update Prose Tests', function () {
718710 const command = Connection . prototype . command . wrappedMethod . bind ( this ) ;
719711
720712 if ( cmd . hello || cmd [ LEGACY_HELLO_COMMAND ] ) {
721- if ( ! initialClientMetadata ) {
722- initialClientMetadata = cmd . client ;
713+ if ( ! clientMetadata ) {
714+ clientMetadata = cmd . client ;
723715 } else {
724716 updatedClientMetadata = cmd . client ;
725717 }
@@ -748,7 +740,7 @@ describe('Client Metadata Update Prose Tests', function () {
748740 await client . db ( 'test' ) . command ( { ping : 1 } ) ;
749741
750742 // 11. Assert that `clientMetadata` is identical to `updatedClientMetadata`.
751- expect ( updatedClientMetadata ) . to . deep . equal ( initialClientMetadata ) ;
743+ expect ( updatedClientMetadata ) . to . deep . equal ( clientMetadata ) ;
752744 } ) ;
753745 } ) ;
754746
0 commit comments