Read about our upcoming Code of Conduct on this issue

test: simplify test-amend.t to avoid race condition

Insted on relying on sleep, we could simply have the editor do the file change.
This remove the reliance on "sleep" and avoid test failing on heavy load
machine.

To test this, I reverted the code change in 5558e3437872 and the test started
failing again.

This is a graft on stable of 141ceec06b55 which should have targeted for stable.

--HG--
branch : stable
12 jobs for topic/stable/flacky-test in 50 minutes and 47 seconds (queued for 30 minutes and 44 seconds)
Status Name Job ID Coverage
  Test
passed checks-py2 #57033

00:06:23

passed checks-py3 #57034

00:03:44

passed rust-cargo-test-py2 #57035

00:01:55

passed rust-cargo-test-py3 #57036

00:01:55

passed test-py2 #57037

00:27:07

passed test-py2-pure #57039

00:26:58

passed test-py2-rust #57041

00:31:47

passed test-py3 #57038

00:13:37

passed test-py3-pure #57040

00:14:22

passed test-py3-rust #57081

00:12:34

failed test-py3-rust #57080

00:03:53

passed test-py3-rust #57042

00:17:55