@@ -9,6 +9,7 @@ import 'package:_pub_shared/data/admin_api.dart';
99import 'package:_pub_shared/data/package_api.dart' ;
1010import 'package:gcloud/storage.dart' ;
1111import 'package:googleapis/storage/v1.dart' show DetailedApiRequestError;
12+ import 'package:logging/logging.dart' ;
1213import 'package:pub_dev/fake/backend/fake_auth_provider.dart' ;
1314import 'package:pub_dev/package/api_export/api_exporter.dart' ;
1415import 'package:pub_dev/shared/storage.dart' ;
@@ -23,6 +24,8 @@ import '../../shared/test_models.dart';
2324import '../../shared/test_services.dart' ;
2425import '../../task/fake_time.dart' ;
2526
27+ final _log = Logger ('api_export.test' );
28+
2629final _testProfile = TestProfile (
2730 defaultUser: userAtPubDevEmail,
2831 packages: [
@@ -55,7 +58,6 @@ void main() {
5558 testWithFakeTime (
5659 'apiExporter.start()' ,
5760 testProfile: _testProfile,
58- skip: 'Fix this test!' ,
5961 (fakeTime) async {
6062 await storageService.createBucket ('bucket' );
6163 final bucket = storageService.bucket ('bucket' );
@@ -68,7 +70,7 @@ void main() {
6870 await _testExportedApiSynchronization (
6971 fakeTime,
7072 bucket,
71- () async => await fakeTime.elapse (hours : 3 ),
73+ () async => await fakeTime.elapse (minutes : 15 ),
7274 );
7375
7476 await apiExporter.stop ();
@@ -81,7 +83,7 @@ Future<void> _testExportedApiSynchronization(
8183 Bucket bucket,
8284 Future <void > Function () synchronize,
8385) async {
84- // ## Existing package
86+ _log. info ( ' ## Existing package' );
8587 {
8688 await synchronize ();
8789
@@ -121,7 +123,7 @@ Future<void> _testExportedApiSynchronization(
121123 );
122124 }
123125
124- // ## New package
126+ _log. info ( ' ## New package' );
125127 {
126128 await importProfile (
127129 source: ImportSource .autoGenerated (),
@@ -167,7 +169,7 @@ Future<void> _testExportedApiSynchronization(
167169 );
168170 }
169171
170- // ## New package version
172+ _log. info ( ' ## New package version' );
171173 {
172174 await importProfile (
173175 source: ImportSource .autoGenerated (),
@@ -206,7 +208,7 @@ Future<void> _testExportedApiSynchronization(
206208 );
207209 }
208210
209- // ## Discontinued flipped on
211+ _log. info ( ' ## Discontinued flipped on' );
210212 {
211213 final api = await createFakeAuthPubApiClient (email: userAtPubDevEmail);
212214 await api.setPackageOptions (
@@ -229,7 +231,7 @@ Future<void> _testExportedApiSynchronization(
229231 );
230232 }
231233
232- // ## Discontinued flipped off
234+ _log. info ( ' ## Discontinued flipped off' );
233235 {
234236 final api = await createFakeAuthPubApiClient (email: userAtPubDevEmail);
235237 await api.setPackageOptions (
@@ -251,7 +253,7 @@ Future<void> _testExportedApiSynchronization(
251253 );
252254 }
253255
254- // ## Version retracted
256+ _log. info ( ' ## Version retracted' );
255257 {
256258 final api = await createFakeAuthPubApiClient (email: userAtPubDevEmail);
257259 await api.setVersionOptions (
@@ -274,7 +276,7 @@ Future<void> _testExportedApiSynchronization(
274276 );
275277 }
276278
277- // ## Version moderated
279+ _log. info ( ' ## Version moderated' );
278280 {
279281 // Elapse time before moderating package, because exported-api won't delete
280282 // recently created files as a guard against race conditions.
@@ -315,7 +317,7 @@ Future<void> _testExportedApiSynchronization(
315317 );
316318 }
317319
318- // ## Version reinstated
320+ _log. info ( ' ## Version reinstated' );
319321 {
320322 final adminApi = createPubApiClient (
321323 authToken
: createFakeServiceAccountToken (email
: '[email protected] ' ),
@@ -352,7 +354,7 @@ Future<void> _testExportedApiSynchronization(
352354 );
353355 }
354356
355- // ## Package moderated
357+ _log. info ( ' ## Package moderated' );
356358 {
357359 // Elapse time before moderating package, because exported-api won't delete
358360 // recently created files as a guard against race conditions.
@@ -387,7 +389,7 @@ Future<void> _testExportedApiSynchronization(
387389 );
388390 }
389391
390- // ## Package reinstated
392+ _log. info ( ' ## Package reinstated' );
391393 {
392394 final adminApi = createPubApiClient (
393395 authToken
: createFakeServiceAccountToken (email
: '[email protected] ' ),
0 commit comments