updated tests and reduce the timeouts

This commit is contained in:
ArnabChatterjee20k
2026-04-17 12:02:17 +05:30
parent 1f27769cc9
commit a4b6d9a635
2 changed files with 498 additions and 617 deletions
+22 -2
View File
@@ -63,11 +63,31 @@ trait PresenceBase
$this->assertEquals($payload['userId'], $response['body']['userId']);
$canonicalPresence = $this->client->call(
Client::METHOD_GET,
'/presences',
[
'content-type' => 'application/json',
'x-appwrite-project' => $projectId,
'x-appwrite-key' => $this->getPresenceApiKey(),
],
[
'queries' => [
Query::equal('userId', [$payload['userId']])->toString(),
],
]
);
$this->assertEquals(200, $canonicalPresence['headers']['status-code']);
$this->assertGreaterThanOrEqual(1, $canonicalPresence['body']['total'] ?? 0);
$this->assertNotEmpty($canonicalPresence['body']['presences'][0] ?? []);
$presence = $canonicalPresence['body']['presences'][0];
if (empty($overrides)) {
self::$presenceCache[$cacheKey] = $response['body'];
self::$presenceCache[$cacheKey] = $presence;
}
return $response['body'];
return $presence;
}
public function testUpsertAndGetPresence(): void
File diff suppressed because it is too large Load Diff