This is an archive of the discontinued Mercurial Phabricator instance.

tests: fix test-flagprocessor.t flakiness
ClosedPublic

Authored by martinvonz on Jul 31 2017, 7:58 PM.

Details

Summary

The test for duplicate flag processors depended on the timestamps
being set in the dirstate to work. If the time between the the
previous failed commit (which would set the timestamp, due to bug

  1. and the attempted commit with the duplicate flag processors was

small enough, it would fail. The failure was caused by a call to
commands.status() early in the commit process. If the dirstate did not
have the timestamp set, it would need to fetch the file content to
compare with. Since two flag processors had been registered, it would
attempted to base64 decode the contents twice, which would of course
fail.

This patch adds a "hg debugrebuilddirstate" to make it deterministic
and also replaces the test case's "hg commit" by simply "hg status",
since that will trigger reading of the contents and thereby use of the
flag processors as noted above.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

martinvonz created this revision.Jul 31 2017, 7:58 PM
dsp edited the summary of this revision. (Show Details)Aug 1 2017, 11:33 AM
dsp edited the summary of this revision. (Show Details)
dsp requested changes to this revision.Aug 1 2017, 11:39 AM
dsp added a subscriber: dsp.
dsp added inline comments.
tests/test-flagprocessor.t
168

I think want to either remove this line or glob it.

This revision now requires changes to proceed.Aug 1 2017, 11:39 AM
martinvonz edited edge metadata.Aug 1 2017, 1:14 PM
martinvonz edited the summary of this revision. (Show Details)
martinvonz updated this revision to Diff 475.
martinvonz marked an inline comment as done.Aug 1 2017, 1:14 PM
akushner accepted this revision.Aug 1 2017, 1:23 PM
durin42 accepted this revision.Aug 1 2017, 3:52 PM
durin42 added a subscriber: durin42.

queued 201, 202 for stable

This revision was automatically updated to reflect the committed changes.