0

Improve overly helpful helper in DnsTransactionTest

TransactionHelper was way too helpful, hiding away the actual
transaction creation logic. Makes it too annoying to test additions or
changes to the transaction creation logic, eg the new |fast_timeout|
param, without adding more support to the helper.

Fixes:
*TransactionHelper::StartTransaction() now has an overload to allow
 passing in a transaction created by the individual test, rather than
 requiring that TransactionHelper always do the transaction creation.
*TransactionHelper constructor params used for transaction creation now
 moved to the "old" StartTransaction(), so they are only necessary when
 the helper is doing the transaction creation.
*Scaled back the Run...() helper methods that were themselves calling
 StartTransaction() and creating transactions. Now just a single
 RunUntilComplete() that runs an already created and started transaction
 until its completion callback gets called (same as the previous
 RunUntilDone() except it doesn't create and start the transaction).
 Does not return a bool indicating completion because it would always be
 true (and was uselessly always true for RunUntilDone()).

Change-Id: I5e3a783730e4bd6d2362fcfc55ac4870e754d340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2468463
Reviewed-by: Dan McArdle <dmcardle@chromium.org>
Commit-Queue: Eric Orth <ericorth@chromium.org>
Auto-Submit: Eric Orth <ericorth@chromium.org>
Cr-Commit-Position: refs/heads/master@{#817174}
This commit is contained in:
Eric Orth
2020-10-14 20:32:40 +00:00
committed by Commit Bot
parent 83f96b3891
commit 6baea144cc

File diff suppressed because it is too large Load Diff