Export test: wait for the contacts, not just the node name
setUpAll only waited for selfName; the contacts arrive after the channel and queue sync, so under the load of the full suite the GPX test ran on an empty contact list (fails on upstream/dev too, passes alone). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ceab62428a
commit
d2db6aff19
1 file changed
+4
-1
@@ -54,7 +54,10 @@ void main() {
|
|||||||
);
|
);
|
||||||
await connector.connectReview();
|
await connector.connectReview();
|
||||||
final end = DateTime.now().add(const Duration(seconds: 8));
|
final end = DateTime.now().add(const Duration(seconds: 8));
|
||||||
while (connector.selfName == null && DateTime.now().isBefore(end)) {
|
// The contacts come after the channel and queue sync: waiting for the
|
||||||
|
// name alone loses the race when the whole suite loads the machine.
|
||||||
|
while ((connector.selfName == null || !connector.hasLoadedContacts) &&
|
||||||
|
DateTime.now().isBefore(end)) {
|
||||||
await Future<void>.delayed(const Duration(milliseconds: 25));
|
await Future<void>.delayed(const Duration(milliseconds: 25));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in new issue
Block a user