Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: tests/standalone/io/directory_create_race_test.dart

Issue 12212016: Remove Expect from core library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add deprecation comment for ExpectException and revert one test. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Test for a race condition that can occur when recursively creating 5 // Test for a race condition that can occur when recursively creating
6 // a directory multiple times simultaneously. This consistently reproduces 6 // a directory multiple times simultaneously. This consistently reproduces
7 // issue https://code.google.com/p/dart/issues/detail?id=7679 in revisions 7 // issue https://code.google.com/p/dart/issues/detail?id=7679 in revisions
8 // without the fix for this issue. 8 // without the fix for this issue.
9 9
10 import "package:expect/expect.dart";
10 import "dart:async"; 11 import "dart:async";
11 import "dart:io"; 12 import "dart:io";
12 import "dart:isolate"; 13 import "dart:isolate";
13 14
14 void testCreateRecursiveRace() { 15 void testCreateRecursiveRace() {
15 var keepAlive = new ReceivePort(); 16 var keepAlive = new ReceivePort();
16 var temp = new Directory('').createTempSync(); 17 var temp = new Directory('').createTempSync();
17 var d = new Directory('${temp.path}/a/b/c/d/e'); 18 var d = new Directory('${temp.path}/a/b/c/d/e');
18 Future.wait([ 19 Future.wait([
19 d.create(recursive: true), 20 d.create(recursive: true),
(...skipping 14 matching lines...) Expand all
34 temp.delete(recursive: true).then((_) { 35 temp.delete(recursive: true).then((_) {
35 keepAlive.close(); 36 keepAlive.close();
36 }); 37 });
37 }); 38 });
38 } 39 }
39 40
40 void main() { 41 void main() {
41 testCreateRecursiveRace(); 42 testCreateRecursiveRace();
42 testCreateRecursiveRace(); 43 testCreateRecursiveRace();
43 } 44 }
OLDNEW
« no previous file with comments | « tests/standalone/io/delete_symlink_test.dart ('k') | tests/standalone/io/directory_error_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698