git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: gitster@pobox.com, stolee@gmail.com,
	Derrick Stolee <derrickstolee@github.com>,
	Derrick Stolee <dstolee@microsoft.com>
Subject: [PATCH] t1092: use GIT_PROGRESS_DELAY for consistent results
Date: Mon, 24 May 2021 19:55:07 +0000	[thread overview]
Message-ID: <pull.960.git.1621886108515.gitgitgadget@gmail.com> (raw)

From: Derrick Stolee <dstolee@microsoft.com>

The t1092-sparse-checkout-compatibility.sh tests compare the stdout and
stderr for several Git commands across both full checkouts, sparse
checkouts with a full index, and sparse checkouts with a sparse index.
Since these are direct comparisons, sometimes a progress indicator can
flush at unpredictable points, especially on slower machines. This
causes the tests to be flaky.

One standard way to avoid this is to add GIT_PROGRESS_DELAY=0 to the Git
commands that are run, as this will force every progress indicator
created with start_progress_delay() to be created immediately. However,
there are some progress indicators that are created in the case of a
full index that are not created with a sparse index. Moreover, their
values may be different as those indexes have a different number of
entries.

Instead, use GIT_PROGRESS_DELAY=100000 to ensure that any reasonable
machine running these tests would never display delayed progress
indicators.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
    t1092: use GIT_PROGRESS_DELAY for consistent results
    
    We found this while running PR builds in microsoft/git.
    
    Thanks, -Stolee

Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-960%2Fderrickstolee%2Fsparse-index%2Fprogress-fix-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-960/derrickstolee/sparse-index/progress-fix-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/960

 t/t1092-sparse-checkout-compatibility.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/t/t1092-sparse-checkout-compatibility.sh b/t/t1092-sparse-checkout-compatibility.sh
index 12e6c453024f..e9a815ca7aaa 100755
--- a/t/t1092-sparse-checkout-compatibility.sh
+++ b/t/t1092-sparse-checkout-compatibility.sh
@@ -106,18 +106,18 @@ init_repos () {
 run_on_sparse () {
 	(
 		cd sparse-checkout &&
-		"$@" >../sparse-checkout-out 2>../sparse-checkout-err
+		GIT_PROGRESS_DELAY=100000 "$@" >../sparse-checkout-out 2>../sparse-checkout-err
 	) &&
 	(
 		cd sparse-index &&
-		"$@" >../sparse-index-out 2>../sparse-index-err
+		GIT_PROGRESS_DELAY=100000 "$@" >../sparse-index-out 2>../sparse-index-err
 	)
 }
 
 run_on_all () {
 	(
 		cd full-checkout &&
-		"$@" >../full-checkout-out 2>../full-checkout-err
+		GIT_PROGRESS_DELAY=100000 "$@" >../full-checkout-out 2>../full-checkout-err
 	) &&
 	run_on_sparse "$@"
 }

base-commit: de88ac70f3a801262eb3aa087e5d9a712be0a54a
-- 
gitgitgadget

             reply	other threads:[~2021-05-24 19:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-24 19:55 Derrick Stolee via GitGitGadget [this message]
2021-05-24 20:28 ` [PATCH] t1092: use GIT_PROGRESS_DELAY for consistent results Jonathan Nieder
2021-05-24 20:38   ` Derrick Stolee
2021-05-24 21:42     ` Taylor Blau
2021-05-24 22:57       ` Ævar Arnfjörð Bjarmason
2021-05-25  0:13         ` Taylor Blau
2021-05-25  0:39           ` Derrick Stolee
2021-05-25  6:32             ` Junio C Hamano
2021-05-25 10:54               ` Derrick Stolee
2021-05-25 20:46                 ` Junio C Hamano
2021-05-25 21:14                   ` Junio C Hamano
2021-05-25 21:49                   ` Taylor Blau
2021-05-25  2:54           ` Junio C Hamano
2021-05-25 15:10             ` Taylor Blau
2021-05-25  7:39           ` Ævar Arnfjörð Bjarmason
2021-05-25  8:06             ` Junio C Hamano
2021-05-25  2:49       ` Junio C Hamano
2021-05-25  2:41     ` Junio C Hamano

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=pull.960.git.1621886108515.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=dstolee@microsoft.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stolee@gmail.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).