Skip to content

Commit

Permalink
Wait longer in post-deployment test for the version to be updated. (d…
Browse files Browse the repository at this point in the history
  • Loading branch information
isoos authored Apr 8, 2024
1 parent 19ded2e commit df3e0de
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/pub_integration/lib/script/publishing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,15 @@ class PublishingScript {
await dart.publish(_dummyDir.path,
expectedOutputContains:
'Successfully uploaded https://pub.dev/packages/_dummy_pkg version $_newDummyVersion');
await Future.delayed(Duration(seconds: 1));
// On appengine we may experiece a longer cache period for the public API.
// Waiting for up to 150 seconds for the version to be updated.
for (var i = 1; i <= 50; i++) {
await Future.delayed(Duration(seconds: 3));
final latest = await _pubHttpClient.getLatestVersionName('_dummy_pkg');
if (latest == _newDummyVersion) {
break;
}
}
await _verifyDummyPkg();

// upload the same version again
Expand Down

0 comments on commit df3e0de

Please sign in to comment.