mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: Make Storage cursorAfter test parallel-safe
Use assertGreaterThanOrEqual and find bucket by ID instead of assuming exact count and position after cursor query. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
07c9a274b1
commit
fd8e8fc736
@@ -204,9 +204,11 @@ class StorageCustomServerTest extends Scope
|
||||
$this->assertEquals(200, $response['headers']['status-code']);
|
||||
$this->assertNotEmpty($response['body']);
|
||||
$this->assertNotEmpty($response['body']['buckets']);
|
||||
$this->assertCount(1, $response['body']['buckets']);
|
||||
|
||||
$this->assertEquals('bucket1', $response['body']['buckets'][0]['$id']);
|
||||
// In parallel execution, there may be more buckets after the cursor
|
||||
$this->assertGreaterThanOrEqual(1, count($response['body']['buckets']));
|
||||
// Find bucket1 by ID (may not be first in parallel execution)
|
||||
$bucketIds = array_column($response['body']['buckets'], '$id');
|
||||
$this->assertContains('bucket1', $bucketIds, 'bucket1 should exist in bucket list after cursor');
|
||||
}
|
||||
|
||||
public function testGetBucket(): void
|
||||
|
||||
Reference in New Issue
Block a user