docstr: Test reservation server, expecting 1 reservation
docstr_tok: ["Test","reservation","server",",","expecting","1","reservation"]
code: def test_reservation_server(self):
      """Test reservation server, expecting 1 reservation"""
      s = Server(1)
      addr = s.start()
  
      # add first reservation
      c = Client(addr)
      resp = c.register({"node": 1})
      self.assertEqual(resp, "OK")
  
      # get list of reservations
      reservations = c.get_reservations()
      self.assertEqual(len(reservations), 1)
  
      # should return immediately with list of reservations
      reservations = c.await_reservations()
      self.assertEqual(len(reservations), 1)
  
      # 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 2 for calling the ReservationTest obj's underlying member method code with example usage: obj.test_reservation_server() without return types