'https://httpbin.org/'

def test_keep_alive(self):

    self.rv = self.client.head(self.url('/'), environ_base=env(), headers=headers())
    time_non_alive = self.zmirror.parse.remote_response.elapsed
    max_fail_count = 3
    for _ in range(10):
        self.rv2 = self.client.head(self.url('/'), environ_base=env(), headers=headers())
        time_alive = self.zmirror.parse.remote_response.elapsed
        print ('TestKeepAlive:    NonAlive:', time_non_alive, 'Alive:', time_alive)
        try:
            self.assertGreater(time_non_alive, time_alive, msg=self.dump())
        except:
            max_fail_count -= 1
            if (not max_fail_count):
                raise
