def METHOD_NAME(self):
    portstr = "tcp:0:interface=127.0.0.1"
    reg = yield self.pbm.register(portstr, "boris", "pass", self.perspectiveFactory)
    disp = self.pbm.dispatchers[portstr]
    try:
        # simulate a reconfig/restart in progress
        yield self.pbm.master.initLock.acquire()
        # try to authenticate while the lock is locked
        d = disp.requestAvatarId(credentials.UsernamePassword(b'boris', b'pass'))
        self.assertFalse(d.called,
            "requestAvatarId should block until the lock is released")
    finally:
        # release the lock, it should allow for auth to proceed
        yield self.pbm.master.initLock.release()
    self.assertTrue(d.called,
        "requestAvatarId should have been called after the lock was released")
    yield reg.unregister()