message: Support synchronous handshake writes in ServerHandshakeTest.
  Summary:
  Previously we would only write the data to the client after an asynchronous
  event.
diff: @@ -124,9 +124,21 @@ class ServerHandshakeTest : public Test {
  initialize();
  handshake->accept(params);
  - EXPECT_CALL(serverCallback, onCryptoEventAvailable())
  - .WillRepeatedly(Invoke([&]() {
  + ON_CALL(serverCallback, onCryptoEventAvailable())
  + .WillByDefault(Invoke([this]() {
  VLOG(1) << "onCryptoEventAvailable";
  + processCryptoEvents();
  + }));
  + auto cachedPsk = clientCtx->getPsk(hostname);
  + fizzClient->connect(
  + clientCtx,
  + verifier,
  + hostname,
  + cachedPsk,
  + std::make_shared<FizzClientExtensions>(clientExtensions));
  + }
  +
  + void processCryptoEvents() {
  try {
  setHandshakeState();
  waitForData = false;
  @@ -146,18 +158,10 @@ class ServerHandshakeTest : public Test {
  VLOG(1) << "server exception " << e.what();
  ex = std::make_exception_ptr(e);
  }
  - if (!inRoundScope_) {
  + if (!inRoundScope_ && !handshakeCv.ready()) {
  VLOG(1) << "Posting handshake cv";
  handshakeCv.post();
  }
  - }));
  - auto cachedPsk = clientCtx->getPsk(hostname);
  - fizzClient->connect(
  - clientCtx,
  - verifier,
  - hostname,
  - cachedPsk,
  - std::make_shared<FizzClientExtensions>(clientExtensions));
  }
  void clientServerRound() {
  @@ -174,7 +178,7 @@ class ServerHandshakeTest : public Test {
  handshake->doHandshake(std::move(content.data), encryptionLevel);
  }
  }
  - setHandshakeState();
  + processCryptoEvents();
  } catch (const QuicTransportException&) {
  ex = std::current_exception();
  }
  @@ -500,6 +504,7 @@ TEST_F(ServerHandshakeWriteNSTTest, TestWriteNST) {
  return std::make_pair(folly::IOBuf::copyBuffer("appToken"), 100s);
  }));
  handshake->writeNewSessionTicket(appToken);
  + processCryptoEvents();
  evb.loop();
  EXPECT_TRUE(cache_->getPsk(kTestHostname.str()));
  }
  