close_server_connection_uncleanly (TestConnection *test)
{
  GIOStream *base_iostream;
  GError *error = NULL;

  /* Instead of closing the GTlsConnection itself, we'll directly close its
   * underlying output stream in order to ensure the TLS close notify is never
   * sent.
   */
  g_object_get (test->server_connection,
                "base-io-stream", &base_iostream,
                NULL);

  g_io_stream_close (base_iostream, NULL, &error);
  g_assert_no_error (error);

  test->server_running = FALSE;

  g_object_unref (base_iostream);
}
close_server_connection_uncleanly (TestConnection *test)
{
  GIOStream *base_iostream;
  GError *error = NULL;

   
  g_object_get (test->server_connection,
                "base-io-stream", &base_iostream,
                NULL);

  g_io_stream_close (base_iostream, NULL, &error);
  g_assert_no_error (error);

  test->server_running = FALSE;

  g_object_unref (base_iostream);
}