docstr: target: test list collection with an invalid api key
  method: list collection with invalid api key
  expected: raise error with right error code and message
docstr_tok: ["target",":","test","list","collection","with","an","invalid","api","key","method",":","list","collection","with","invalid","api","key","expected",":","raise","error","with","right","error","code","and","message"]
code: def test_list_collections_with_invalid_api_key(self):
      """
      target: test list collection with an invalid api key
      method: list collection with invalid api key
      expected: raise error with right error code and message
      """
      client = self.collection_client
      name_list = []
      for i in range(2):
          name = gen_collection_name()
          dim = 128
          payload = {
              "collectionName": name,
              "dimension": dim,
          }
          time.sleep(1)
          rsp = client.collection_create(payload)
          assert rsp["code"] == 200
          name_list.append(name)
      client = self.collection_client
      client.api_key = "illegal_api_key"
      rsp = client.collection_list()
      assert rsp["code"] == 1800
  
imports: import datetime
  import random
  import time
  from utils.util_log import test_log
  from utils.utils import gen_collection_name
  import pytest
  from api.milvus import CollectionClient
  from base.testbase import TestBase
  import threading
label_desc: Use image node_id 2 for calling the TestListCollections obj's underlying member method code with example usage: obj.test_list_collections_with_invalid_api_key() without return types