class_docstr: Create a :class:`orion.core.io.database.mongodb.MongoDB`, check connection cases.
class_docstr_tok: ["Create","a",":","class",":","`","orion.core.io.database.mongodb.MongoDB","`",",","check","connection","cases","."]
docstr: Test that the server timeout is correctly changed.
docstr_tok: ["Test","that","the","server","timeout","is","correctly","changed","."]
code: def test_change_server_timeout(self):
      """Test that the server timeout is correctly changed."""
      assert (
          timeit(
              lambda: MongoDB(
                  username="user",
                  password="pass",
                  name="orion_test",
                  serverSelectionTimeoutMS=1000,
              ),
              number=1,
          )
          <= 2
      )
  
imports: import functools
  from timeit import timeit
  import pymongo
  import pytest
  from pymongo import MongoClient
  from orion.core.io.database import Database, DatabaseError, DuplicateKeyError
  from orion.core.io.database.mongodb import AUTH_FAILED_MESSAGES, MongoDB
  from .conftest import insert_test_collection
  from .test_database import get_db
label_desc: Use image node_id 6 for calling the TestConnection obj's underlying member method code with example usage: obj.test_change_server_timeout() without return types