docstr: Test reservation server, expecting multiple reservations
docstr_tok: ["Test","reservation","server",",","expecting","multiple","reservations"]
code: def test_reservation_server_multi(self):
      """Test reservation server, expecting multiple reservations"""
      num_clients = 4
      s = Server(num_clients)
      addr = s.start()
  
      def reserve(num):
          c = Client(addr)
          # time.sleep(random.randint(0,5))     # simulate varying start times
          resp = c.register({"node": num})
          self.assertEqual(resp, "OK")
          c.await_reservations()
          c.close()
  
      # start/register clients
      threads = [None] * num_clients
      for i in range(num_clients):
          threads[i] = threading.Thread(target=reserve, args=(i,))
          threads[i].start()
  
      # wait for clients to complete
      for i in range(num_clients):
          threads[i].join()
      print("all done")
  
      # get list of reservations
      c = Client(addr)
      reservations = c.get_reservations()
      self.assertEqual(len(reservations), num_clients)
  
      # request server stop
      c.request_stop()
      time.sleep(1)
      self.assertEqual(s.done, True)
  
file_path: TensorFlowOnSpark/tests/test_reservation.py
imports: import os
  import threading
  import time
  import unittest
  from tensorflowonspark import util
  from tensorflowonspark.reservation import Reservations, Server, Client
  from unittest import mock
label_desc: Use image node_id 9 for calling the ReservationTest obj's underlying member method code with example usage: obj.test_reservation_server_multi() without return types