@@ -14,8 +14,6 @@ abstract class Base extends TestCase
1414 protected static string $ owner = '' ;
1515 protected static string $ defaultBranch = 'main ' ;
1616
17- abstract protected function createVCSAdapter (): Git ;
18-
1917 abstract protected function setupAdapter (): void ;
2018
2119 public function setUp (): void
@@ -616,18 +614,21 @@ public function testSearchRepositories(): void
616614 {
617615 $ repo1Name = 'test-search-repo1- ' . \uniqid ();
618616 $ repo2Name = 'test-search-repo2- ' . \uniqid ();
619-
617+
620618 $ this ->vcsAdapter ->createRepository (static ::$ owner , $ repo1Name , false );
621619 $ this ->vcsAdapter ->createRepository (static ::$ owner , $ repo2Name , false );
622-
620+
623621 try {
624- $ result = $ this ->vcsAdapter ->searchRepositories (static ::$ owner , 1 , 10 );
625-
622+ $ result = [];
623+ $ this ->assertEventually (function () use (&$ result ) {
624+ $ result = $ this ->vcsAdapter ->searchRepositories (static ::$ owner , 1 , 10 );
625+ $ this ->assertGreaterThanOrEqual (2 , $ result ['total ' ]);
626+ }, 30000 , 2000 );
627+
626628 $ this ->assertIsArray ($ result );
627629 $ this ->assertArrayHasKey ('items ' , $ result );
628630 $ this ->assertArrayHasKey ('total ' , $ result );
629- $ this ->assertGreaterThanOrEqual (2 , $ result ['total ' ]);
630-
631+
631632 $ this ->assertArrayHasKey ('pushed_at ' , $ result ['items ' ][0 ]);
632633 $ this ->assertTrue (
633634 $ result ['items ' ][0 ]['pushed_at ' ] === null || \strtotime ($ result ['items ' ][0 ]['pushed_at ' ]) !== false
0 commit comments