Hi @kanikasingla,
While executing the unit tests with the below command, Junit is failing.
mvn test -Dtest=ConnectionTest
Error Response:
2021-04-05 10:41:06.993 INFO 14300 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: org.springframework.security.web.util.matcher.AnyRequestMatcher@1, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@162b3d47, org.springframework.security.web.context.SecurityContextPersistenceFilter@629adce, org.springframework.security.web.header.HeaderWriterFilter@100c567f, org.springframework.security.web.csrf.CsrfFilter@4bafe935, org.springframework.security.web.authentication.logout.LogoutFilter@bdd2027, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@36b310aa, org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter@1128620c, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@1816e24a, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@743c6ce4, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@108d55c4, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@783115d9, org.springframework.security.web.session.SessionManagementFilter@6d5037a9, org.springframework.security.web.access.ExceptionTranslationFilter@2b917fb0, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@34fe326d]
2021-04-05 10:41:07.278 INFO 14300 --- [ main] mflix.api.daos.ConnectionTest : Started ConnectionTest in 10.047 seconds (JVM running for 11.712)
2021-04-05 10:41:07.631 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-01.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:41:07.637 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-00.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:41:07.642 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-02.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:41:07.660 INFO 14300 --- [ main] org.mongodb.driver.cluster : No server chosen by com.mongodb.client.internal.MongoClientDelegate$1@396639b from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, ServerDescription{address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, ServerDescription{address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]}. Waiting for 30000 ms before timing out
2021-04-05 10:41:37.808 INFO 14300 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[mflix-shard-00-00.m2f7g.mongodb.net:27017, mflix-shard-00-01.m2f7g.mongodb.net:27017, mflix-shard-00-02.m2f7g.mongodb.net:27017], mode=MULTIPLE, requiredClusterType=REPLICA_SET, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500, requiredReplicaSetName='atlas-46mpki-shard-0'}
2021-04-05 10:41:37.808 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-00.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:41:37.809 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-01.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:41:37.810 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-02.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:41:37.836 INFO 14300 --- [ main] org.mongodb.driver.cluster : No server chosen by com.mongodb.client.internal.MongoClientDelegate$1@56380231 from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, ServerDescription{address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, ServerDescription{address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out
2021-04-05 10:41:38.911 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-02.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:41:38.947 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-00.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:41:39.054 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-01.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:42:09.683 INFO 14300 --- [ main] org.mongodb.driver.cluster : Cluster created with settings {hosts=[mflix-shard-00-02.m2f7g.mongodb.net:27017, mflix-shard-00-00.m2f7g.mongodb.net:27017, mflix-shard-00-01.m2f7g.mongodb.net:27017], mode=MULTIPLE, requiredClusterType=REPLICA_SET, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500, requiredReplicaSetName='atlas-46mpki-shard-0'}
2021-04-05 10:42:09.684 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-02.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:42:09.686 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-00.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:42:09.688 INFO 14300 --- [ main] org.mongodb.driver.cluster : Adding discovered server mflix-shard-00-01.m2f7g.mongodb.net:27017 to client view of cluster
2021-04-05 10:42:09.699 INFO 14300 --- [ main] org.mongodb.driver.cluster : No server chosen by com.mongodb.client.internal.MongoClientDelegate$1@242a209e from cluster description ClusterDescription{type=REPLICA_SET, connectionMode=MULTIPLE, serverDescriptions=[ServerDescription{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, ServerDescription{address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}, ServerDescription{address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING}]}. Waiting for 30000 ms before timing out
2021-04-05 10:42:10.744 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-00.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:42:11.262 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-01.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
2021-04-05 10:42:11.268 INFO 14300 --- [ngodb.net:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server mflix-shard-00-02.m2f7g.mongodb.net:27017
com.mongodb.MongoSocketReadException: Prematurely reached end of stream
at com.mongodb.internal.connection.SocketStream.read(SocketStream.java:112) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveResponseBuffers(InternalStreamConnection.java:570) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveMessage(InternalStreamConnection.java:441) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.sendAndReceive(CommandHelper.java:83) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.CommandHelper.executeCommand(CommandHelper.java:33) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initializeConnectionDescription(InternalStreamConnectionInitializer.java:106) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:63) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.InternalStreamConnection.open(InternalStreamConnection.java:127) ~[mongodb-driver-core-3.9.1.jar:na]
at com.mongodb.internal.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:117) ~[mongodb-driver-core-3.9.1.jar:na]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_152]
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 103.57 s <<< FAILURE! - in mflix.api.daos.ConnectionTest
[ERROR] testMoviesCount(mflix.api.daos.ConnectionTest) Time elapsed: 30.245 s <<< ERROR!
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@396639b. Client view of cluster state is {type=REPLICA_SET, servers=[{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]
at mflix.api.daos.ConnectionTest.testMoviesCount(ConnectionTest.java:44)
[ERROR] testConnectionFindsCollections(mflix.api.daos.ConnectionTest) Time elapsed: 30.163 s <<< ERROR!
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@56380231. Client view of cluster state is {type=REPLICA_SET, servers=[{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]
at mflix.api.daos.ConnectionTest.testConnectionFindsCollections(ConnectionTest.java:71)
[ERROR] testConnectionFindsDatabase(mflix.api.daos.ConnectionTest) Time elapsed: 31.855 s <<< ERROR!
com.mongodb.MongoTimeoutException: Timed out after 30000 ms while waiting for a server that matches com.mongodb.client.internal.MongoClientDelegate$1@242a209e. Client view of cluster state is {type=REPLICA_SET, servers=[{address=mflix-shard-00-02.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-00.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}, {address=mflix-shard-00-01.m2f7g.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketReadException: Prematurely reached end of stream}}]
at mflix.api.daos.ConnectionTest.testConnectionFindsDatabase(ConnectionTest.java:52)
2021-04-05 10:42:40.160 INFO 14300 --- [ Thread-3] o.s.w.c.s.GenericWebApplicationContext : Closing org.springframework.web.context.support.GenericWebApplicationContext@909217e: startup date [Mon Apr 05 10:40:58 IST 2021]; root of context hierarchy
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] ConnectionTest.testConnectionFindsCollections:71 » MongoTimeout Timed out afte...
[ERROR] ConnectionTest.testConnectionFindsDatabase:52 » MongoTimeout Timed out after 3...
[ERROR] ConnectionTest.testMoviesCount:44 » MongoTimeout Timed out after 30000 ms whil...
[INFO]
[ERROR] Tests run: 3, Failures: 0, Errors: 3, Skipped: 0
[INFO]