miner: update test re downloader events

Signed-off-by: meows <b5c6@protonmail.com>
This commit is contained in:
meows 2020-10-03 08:29:04 -05:00
parent 2d7fd86a1e
commit 6addca7586
No known key found for this signature in database
GPG key ID: 5786AEA5C8D5A520

View file

@ -89,10 +89,10 @@ func TestMiner(t *testing.T) {
// Stop the downloader and wait for the update loop to run
mux.Post(downloader.DoneEvent{})
waitForMiningState(t, miner, true)
// Start the downloader and wait for the update loop to run
// Start the downloader, the mining state will not change because the update loop has exited
mux.Post(downloader.StartEvent{})
waitForMiningState(t, miner, false)
// Stop the downloader and wait for the update loop to run
waitForMiningState(t, miner, true)
// Stop the downloader, the mining state will not change
mux.Post(downloader.FailedEvent{})
waitForMiningState(t, miner, true)
}