git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Jonathan Tan <jonathantanmy@google.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] t5551: test usage of chunked encoding explicitly
Date: Wed, 5 Jun 2019 15:41:43 -0400	[thread overview]
Message-ID: <20190605194143.GA12686@sigill.intra.peff.net> (raw)
In-Reply-To: <20190605192624.129677-1-jonathantanmy@google.com>

On Wed, Jun 05, 2019 at 12:26:24PM -0700, Jonathan Tan wrote:

> When run using GIT_TEST_PROTOCOL_VERSION=2, a test in t5551 fails
> because 4 POSTs (probe, ls-refs, probe, fetch) are sent instead of 2
> (probe, fetch).
> 
> One way to resolve this would be to relax the condition (from "= 2" to
> greater than 1, say), but upon further inspection, the test probably
> shouldn't be counting the number of POSTs. This test states that large
> requests are split across POSTs, but this is not correct; the main
> change is that chunked transfer encoding is used, but the request is
> still contained within one POST. (The test coincidentally works because
> Git indeed sends 2 POSTs in the case of a large request, but that is
> because, as stated above, the first POST is a probing RPC - see
> post_rpc() in remote-curl.c for more information.)

That seems reasonable. What I was really going for with this test was
just ensuring that we were actually hitting the "large request" code
path at all. And checking for chunked encoding is another way of doing
that. (And I certainly agree that "split across POSTs" is an inaccurate
way of describing what it was trying for).

> With this change, all tests pass at master with
> GIT_TEST_PROTOCOL_VERSION=2.

Yay. Thanks for your persistence with this.

-Peff

      parent reply	other threads:[~2019-06-05 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-05 19:26 [PATCH] t5551: test usage of chunked encoding explicitly Jonathan Tan
2019-06-05 19:40 ` Derrick Stolee
2019-06-05 19:41 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190605194143.GA12686@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=jonathantanmy@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).