[JAVA-3399] Remove failing test: MongoClientsSpecification.application_name_should_appear_in_the_system.profile_collection Created: 23/Aug/19  Updated: 28/Oct/23  Resolved: 03/Sep/19

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

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


 Description   

Remove MongoClientsSpecification.application_name_should_appear_in_the_system.profile_collection. It frequently fails with the following error:

FAILURE: Condition not satisfied:
 
profileDocument.get('appName') == appName
|               |              |  |
|               null           |  appName1
|                              false
[op:insert, ns:JavaDriverTest.com.mongodb.MongoClientSessionSpecification, command:[insert:com.mongodb.MongoClientSessionSpecification, ordered:true, writeConcern:[w:0], $db:JavaDriverTest], ninserted:1, keysInserted:1, numYield:0, locks:[ParallelBatchWriterMode:[acquireCount:[r:4]], ReplicationStateTransition:[acquireCount:[w:4]], Global:[acquireCount:[r:1, w:3]], Database:[acquireCount:[w:3], acquireWaitCount:[w:1], timeAcquiringMicros:[w:6114]], Collection:[acquireCount:[r:2, w:2, W:1]], Mutex:[acquireCount:[r:5]]], flowControl:[acquireCount:3], storage:[:], responseLength:0, protocol:op_msg, millis:27, ts:Fri Aug 23 14:53:36 UTC 2019, client:127.0.0.1, allUsers:[], user:]
 (org.spockframework.runtime.SpockComparisonFailure)
Condition not satisfied:
 
profileDocument.get('appName') == appName
|               |              |  |
|               null           |  appName1
|                              false
[op:insert, ns:JavaDriverTest.com.mongodb.MongoClientSessionSpecification, command:[insert:com.mongodb.MongoClientSessionSpecification, ordered:true, writeConcern:[w:0], $db:JavaDriverTest], ninserted:1, keysInserted:1, numYield:0, locks:[ParallelBatchWriterMode:[acquireCount:[r:4]], ReplicationStateTransition:[acquireCount:[w:4]], Global:[acquireCount:[r:1, w:3]], Database:[acquireCount:[w:3], acquireWaitCount:[w:1], timeAcquiringMicros:[w:6114]], Collection:[acquireCount:[r:2, w:2, W:1]], Mutex:[acquireCount:[r:5]]], flowControl:[acquireCount:3], storage:[:], responseLength:0, protocol:op_msg, millis:27, ts:Fri Aug 23 14:53:36 UTC 2019, client:127.0.0.1, allUsers:[], user:]
 
	at com.mongodb.MongoClientsSpecification.application name should appear in the system.profile collection(MongoClientsSpecification.groovy:54)
system-out:
14:53:36.007 [Test worker] INFO  org.mongodb.driver.cluster - Cluster created with settings {hosts=[localhost:27017], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
14:53:36.008 [Test worker] INFO  org.mongodb.driver.cluster - Cluster description not yet available. Waiting for 30000 ms before timing out
14:53:36.009 [cluster-ClusterId{value='5d5ffdf02629ce314422e7b1', description='null'}-localhost:27017] INFO  org.mongodb.driver.connection - Opened connection [connectionId{localValue:668, serverValue:600}] to localhost:27017
14:53:36.009 [cluster-ClusterId{value='5d5ffdf02629ce314422e7b1', description='null'}-localhost:27017] INFO  org.mongodb.driver.cluster - Monitor thread successfully connected to server with description ServerDescription{address=localhost:27017, type=STANDALONE, state=CONNECTED, ok=true, minWireVersion=0, maxWireVersion=8, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=30, roundTripTimeNanos=227813}
14:53:36.010 [Test worker] INFO  org.mongodb.driver.connection - Opened connection [connectionId{localValue:669, serverValue:601}] to localhost:27017
14:53:36.036 [Test worker] INFO  org.mongodb.driver.connection - Closed connection [connectionId{localValue:669, serverValue:601}] to localhost:27017 because the pool has been closed.

I think the problem is that sometimes something else is getting into the profile collection



 Comments   
Comment by Githook User [ 10/Oct/19 ]

Author:

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

Message: Remove flaky tests that depends on the profile collection

These tests fail frequently on Evergreen, and as we have unit tests
that prove that the app name is included in the client metadata
document, having additional integration tests that prove that the app
name actually made it to the server are nice to have but not essential.

JAVA-3399
Branch: 3.11.x
https://github.com/mongodb/mongo-java-driver/commit/bc76708f6bd87e775fe648318f87ff131c46c3f2

Comment by Githook User [ 03/Sep/19 ]

Author:

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

Message: Remove flaky tests that depends on the profile collection

These tests fail frequently on Evergreen, and as we have unit tests
that prove that the app name is included in the client metadata
document, having additional integration tests that prove that the app
name actually made it to the server are nice to have but not essential.

JAVA-3399
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/dad934fac756b82897ad3717ea342c8f2b850c9b

Generated at Thu Feb 08 08:59:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.