Commit 3331d44f authored by Adam Barth's avatar Adam Barth

Don't try to access the network in Stocks test

Accessing the network created a race condition that would sometimes cause other
tests to fail.
parent 3d41fb8a
......@@ -62,11 +62,15 @@ class StockDataFetcher {
int _nextChunk = 0;
final StockDataCallback callback;
static bool actuallyFetchData = true;
StockDataFetcher(this.callback) {
_fetchNextChunk();
}
void _fetchNextChunk() {
if (!actuallyFetchData)
return;
fetchBody(_urlToFetch(_nextChunk++)).then((Response response) {
String json = response.bodyAsString();
if (json == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment