public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kirill Gavrilov <[email protected]>
To: Kirill Reshke <[email protected]>
Cc: Jim Jones <[email protected]>
Cc: Andrey M. Borodin <[email protected]>
Cc: Euler Taveira <[email protected]>
Cc: [email protected]
Subject: Re: Truncate logs by max_log_size
Date: Sat, 30 Nov 2024 11:44:00 +0300
Message-ID: <CA+E0NR7xYFtHpfnySWrA+CLA8t2sWy4w3XQA7LRXPALZHWgYvg@mail.gmail.com> (raw)
In-Reply-To: <CALdSSPhujM+mMH5CSFM+QYzAS5h=ga8-YDOcGN1LvOZPG4_RUg@mail.gmail.com>
References: <CA+E0NR4S+NC6+QHyY_vUuQZMzLhKqczMx-jJVqtjAxF6+=JwAA@mail.gmail.com>
<[email protected]>
<[email protected]>
<[email protected]>
<CA+E0NR4=J-pgqEAV2weymygGmk1ePym45m2AcGyi2hpa9xRvBg@mail.gmail.com>
<CALdSSPiq+x9pRVYvYtddTQsL8=ZMvob+vSv5mHEXbe0aoPWGig@mail.gmail.com>
<[email protected]>
<CA+E0NR6tnLDanSNwcqZM_-ReBXitAOFsoaBAZBqXYEx0Di+fwQ@mail.gmail.com>
<[email protected]>
<CA+E0NR7=V57gVR_-CHs-0W0XL7UrKdyGfT=ZiQcuCdsDcjN94g@mail.gmail.com>
<[email protected]>
<CA+E0NR6MJfE8Hkk2Q-MgWUkk=Yy_4fWdiiaAKW_Ux_hcAAtAFQ@mail.gmail.com>
<CALdSSPhujM+mMH5CSFM+QYzAS5h=ga8-YDOcGN1LvOZPG4_RUg@mail.gmail.com>
>
>
> Hi
>
> > +for (my $attempts = 0; $attempts < $max_attempts; $attempts++)
> > +{
> > + eval {
> > + $current_logfiles = slurp_file($node->data_dir . '/current_logfiles');
> > + };
> > + last unless $@;
> > + usleep(100_000);
> > +}
>
>
> `usleep` in tap tests is usually a bad pattern. Do we have a chance to
> test this using `wait_for_log` or similar?
>
I'm not sure we can use `wait_for_log` because it checks for only one
logfile. But even if it's possible, I don't think it's a good idea to use
different checks in the same file or to change tests for another feature. I
used test case from above as an example for mine.
view thread (3+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Truncate logs by max_log_size
In-Reply-To: <CA+E0NR7xYFtHpfnySWrA+CLA8t2sWy4w3XQA7LRXPALZHWgYvg@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox