Skip to content

Commit

Permalink
Update url_cache_test.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Sep 18, 2023
1 parent 20cb4a9 commit 20f29cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkgs/cupertino_http/example/integration_test/url_cache_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ void main() {

group('dataTaskWithCompletionHandler', () {
late HttpServer server;
var requestCount = 0;
var uncachedRequestCount = 0;

setUp(() async {
requestCount = 0;
uncachedRequestCount = 0;
server = (await HttpServer.bind('localhost', 0))
..listen((request) async {
await request.drain<void>();
Expand All @@ -26,7 +26,7 @@ void main() {
await request.response.close();
return;
}
++requestCount;
++uncachedRequestCount;
request.response.headers.set('Content-Type', 'text/plain');
request.response.headers.set('ETag', '1234');
request.response.write('Hello World');
Expand Down Expand Up @@ -55,7 +55,7 @@ void main() {
await doRequest(session);
await doRequest(session);

expect(requestCount, 2);
expect(uncachedRequestCount, 2);
});

test('with cache', () async {
Expand All @@ -66,7 +66,7 @@ void main() {
await doRequest(session);
await doRequest(session);

expect(requestCount, 1);
expect(uncachedRequestCount, 1);
});
});
}

0 comments on commit 20f29cb

Please sign in to comment.