message: Test reviving a Dying session
diff: @@ -416,9 +416,10 @@ TEST_CASE("sync: stop policy behavior", "[sync]") {
  };
  std::atomic<bool> error_handler_invoked(false);
  - auto create_session = [&](SyncSessionStopPolicy stop_policy) {
  Realm::Config config;
  auto user = SyncManager::shared().get_user({"user-dying-state", dummy_auth_url}, "not_a_real_token");
  +
  + auto create_session = [&](SyncSessionStopPolicy stop_policy) {
  auto session = sync_session(server, user, "/test-dying-state",
  [](const auto&, const auto&) { return s_test_token; },
  [&](auto, auto) { error_handler_invoked = true; },
  @@ -461,6 +462,12 @@ TEST_CASE("sync: stop policy behavior", "[sync]") {
  EventLoop::main().run_until([&] { return sessions_are_inactive(*session); });
  }
  + SECTION("transitions back to Active if the session is revived") {
  + auto session2 = SyncManager::shared().get_session(config.path, *config.sync_config);
  + REQUIRE(session->state() == SyncSession::PublicState::Active);
  + REQUIRE(session2 == session);
  + }
  +
  SECTION("transitions to Inactive if a fatal error occurs") {
  std::error_code code = std::error_code{static_cast<int>(ProtocolError::bad_syntax), realm::sync::protocol_error_category()};
  SyncSession::OnlyForTesting::handle_error(*session, {code, "Not a real error message", true});
  