| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 library datastore_test; | 5 library datastore_test; |
| 6 | 6 |
| 7 /// NOTE: In order to run these tests, the following datastore indices must | 7 /// NOTE: In order to run these tests, the following datastore indices must |
| 8 /// exist: | 8 /// exist: |
| 9 /// $ cat index.yaml | 9 /// $ cat index.yaml |
| 10 /// indexes: | 10 /// indexes: |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 unnamedEntities5, transactional: true, xg: true).then((keys) { | 237 unnamedEntities5, transactional: true, xg: true).then((keys) { |
| 238 return delete(keys).then((_) { | 238 return delete(keys).then((_) { |
| 239 return lookup(keys).then((List<Entity> entities) { | 239 return lookup(keys).then((List<Entity> entities) { |
| 240 entities.forEach((Entity e) => expect(e, isNull)); | 240 entities.forEach((Entity e) => expect(e, isNull)); |
| 241 }); | 241 }); |
| 242 }); | 242 }); |
| 243 }); | 243 }); |
| 244 }); | 244 }); |
| 245 | 245 |
| 246 test('negative_insert__incomplete_path', () { | 246 test('negative_insert__incomplete_path', () { |
| 247 expect(datastore.commit(inserts: unnamedEntities1), | 247 expect(() => datastore.commit(inserts: unnamedEntities1), |
| 248 throwsA(isApplicationError)); | 248 throwsA(isApplicationError)); |
| 249 }); | 249 }); |
| 250 | 250 |
| 251 test('negative_insert_transactional_xg', () { | 251 test('negative_insert_transactional_xg', () { |
| 252 return testInsertNegative( | 252 return testInsertNegative( |
| 253 unnamedEntities26, transactional: true, xg: true); | 253 unnamedEntities26, transactional: true, xg: true); |
| 254 }); | 254 }); |
| 255 | 255 |
| 256 test('negative_insert_20000_entities', () { | 256 test('negative_insert_20000_entities', () { |
| 257 // Maybe it should not be a [DataStoreError] here? | 257 // Maybe it should not be a [DataStoreError] here? |
| 258 // FIXME/TODO: This was adapted | 258 // FIXME/TODO: This was adapted |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 main() { | 1112 main() { |
| 1113 var scopes = datastore_impl.DatastoreImpl.SCOPES; | 1113 var scopes = datastore_impl.DatastoreImpl.SCOPES; |
| 1114 | 1114 |
| 1115 withAuthClient(scopes, (String project, httpClient) { | 1115 withAuthClient(scopes, (String project, httpClient) { |
| 1116 var datastore = new datastore_impl.DatastoreImpl(httpClient, 's~$project'); | 1116 var datastore = new datastore_impl.DatastoreImpl(httpClient, 's~$project'); |
| 1117 return cleanupDB(datastore, null).then((_) { | 1117 return cleanupDB(datastore, null).then((_) { |
| 1118 return runE2EUnittest(() => runTests(datastore, null)); | 1118 return runE2EUnittest(() => runTests(datastore, null)); |
| 1119 }); | 1119 }); |
| 1120 }); | 1120 }); |
| 1121 } | 1121 } |
| OLD | NEW |