[CXX-1953] client session tests causing failures on Travis Created: 06/Mar/20  Updated: 28/Oct/23  Resolved: 08/Jul/20

Status: Closed
Project: C++ Driver
Component/s: Testing
Affects Version/s: None
Fix Version/s: 3.6.0-rc0, 3.6.0

Type: Task Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Observed here:
https://travis-ci.org/github/mongodb/mongo-cxx-driver/jobs/703266901

With logs:

-------------------------------------------------------------------------------
session
  pool
-------------------------------------------------------------------------------
/home/travis/build/mongodb/mongo-cxx-driver/src/mongocxx/test/client_session.cpp:125
...............................................................................
/home/travis/build/mongodb/mongo-cxx-driver/src/mongocxx/test/client_session.cpp:137: FAILED:
  REQUIRE( session_c->id() == b_id )
with expansion:
  { "id" : { "$binary" : { "base64": "FqitkZCWSPq4O5kMipwlRQ==", "subType" :
  "04" } } }
  ==
  {?}
-------------------------------------------------------------------------------

After CDRIVER-3322, libmongoc no longer pools unused sessions. A test in the C++ driver was relying on this behavior. The fix is to simply use the session before destroying it so it gets back onto the pool.



 Comments   
Comment by Githook User [ 07/Jul/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CXX-1953 fix session test

After CDRIVER-3322, libmongoc no longer pools unused sessions.
Fixes a test that was relying on this behavior to use the session it is
expecting to pool.
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/22a82b26ab755be5acb734d67d7390250244f8b8

Comment by Kevin Albertson [ 30/Jun/20 ]

PR: https://github.com/mongodb/mongo-cxx-driver/pull/680

Comment by Kevin Albertson [ 29/Jun/20 ]

Still appears to be failing on master even after CXX-2041.

Generated at Wed Feb 07 22:04:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.