This repository was archived by the owner on Jul 16, 2024. It is now read-only. 
      
File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed 
it/scala/org/mongodb/scala 
main/scala/org/mongodb/scala Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,9 @@ class SmokeTestISpec extends RequiresMongoDBISpec with FuturesSpec {
4949 info(" find first should return null if no documents" 
5050 collection.find().first().futureValue shouldBe null  //  scalastyle:ignore
5151
52+  info(" find should return an empty list" 
53+  collection.find().futureValue shouldBe empty
54+ 
5255 info(" Insert a document" 
5356 collection.insertOne(document).futureValue should equal(Completed ())
5457
Original file line number Diff line number Diff line change @@ -442,7 +442,10 @@ trait ObservableImplicits {
442442 subscription.request(1 )
443443 }
444444
445-  override  def  onError (throwable : Throwable ):  Unit  =  completeWith(" onError" =>  observer.onError(throwable))
445+  override  def  onError (throwable : Throwable ):  Unit  =  throwable match  {
446+  case  npe : NullPointerException  =>  onComplete()
447+  case  _ =>  completeWith(" onError" =>  observer.onError(throwable))
448+  }
446449
447450 override  def  onComplete ():  Unit  =  {
448451 completeWith(" onComplete" => 
                         You can’t perform that action at this time. 
           
                  
0 commit comments