mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
286e0e5802 | ||
|
|
ac05c9e9ce |
@@ -332,6 +332,7 @@ jobs:
|
||||
Avatars,
|
||||
Console,
|
||||
Databases,
|
||||
TablesDB,
|
||||
Functions,
|
||||
FunctionsSchedule,
|
||||
GraphQL,
|
||||
@@ -420,7 +421,7 @@ jobs:
|
||||
# Services that rely on sequential test method execution (shared static state)
|
||||
FUNCTIONAL_FLAG="--functional"
|
||||
case "${{ matrix.service }}" in
|
||||
Databases|Functions|Realtime) FUNCTIONAL_FLAG="" ;;
|
||||
Databases|TablesDB|Functions|Realtime) FUNCTIONAL_FLAG="" ;;
|
||||
esac
|
||||
|
||||
docker compose exec -T \
|
||||
|
||||
+7
-23
@@ -50,16 +50,6 @@ require_once __DIR__ . '/init.php';
|
||||
|
||||
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
|
||||
|
||||
// Log uncaught exceptions in one line instead of relying on Swoole's full backtrace dump
|
||||
set_exception_handler(function (\Throwable $e) {
|
||||
Console::error(sprintf(
|
||||
'Realtime uncaught exception: %s in %s:%d',
|
||||
$e->getMessage(),
|
||||
$e->getFile(),
|
||||
$e->getLine()
|
||||
));
|
||||
});
|
||||
|
||||
// Allows overriding
|
||||
if (!function_exists('getConsoleDB')) {
|
||||
function getConsoleDB(): Database
|
||||
@@ -995,21 +985,15 @@ $server->onMessage(function (int $connection, string $message) use ($server, $re
|
||||
});
|
||||
|
||||
$server->onClose(function (int $connection) use ($realtime, $stats, $register) {
|
||||
try {
|
||||
if (array_key_exists($connection, $realtime->connections)) {
|
||||
$stats->decr($realtime->connections[$connection]['projectId'], 'connectionsTotal');
|
||||
$register->get('telemetry.connectionCounter')->add(-1);
|
||||
if (array_key_exists($connection, $realtime->connections)) {
|
||||
$stats->decr($realtime->connections[$connection]['projectId'], 'connectionsTotal');
|
||||
$register->get('telemetry.connectionCounter')->add(-1);
|
||||
|
||||
$projectId = $realtime->connections[$connection]['projectId'];
|
||||
$projectId = $realtime->connections[$connection]['projectId'];
|
||||
|
||||
triggerStats([
|
||||
METRIC_REALTIME_CONNECTIONS => -1,
|
||||
], $projectId);
|
||||
}
|
||||
} catch (\Throwable $th) {
|
||||
// Log only; do not rethrow. If we let this bubble, Swoole dumps full coroutine
|
||||
// backtraces and unsubscribe() below would never run (connection cleanup would fail).
|
||||
Console::error('Realtime onClose error: ' . $th->getMessage());
|
||||
triggerStats([
|
||||
METRIC_REALTIME_CONNECTIONS => -1,
|
||||
], $projectId);
|
||||
}
|
||||
$realtime->unsubscribe($connection);
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\TablesDB;
|
||||
namespace Tests\E2E\Services\TablesDB;
|
||||
|
||||
use Tests\E2E\Client;
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Permissions;
|
||||
namespace Tests\E2E\Services\TablesDB\Permissions;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\E2E\Client;
|
||||
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\SchemaPolling;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Permissions;
|
||||
namespace Tests\E2E\Services\TablesDB\Permissions;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\E2E\Client;
|
||||
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\SchemaPolling;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
+2
-1
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Permissions;
|
||||
namespace Tests\E2E\Services\TablesDB\Permissions;
|
||||
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use Tests\E2E\Client;
|
||||
@@ -9,6 +9,7 @@ use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\SchemaPolling;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Permissions\DatabasesPermissionsBase;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases;
|
||||
namespace Tests\E2E\Services\TablesDB;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideConsole;
|
||||
use Tests\E2E\Services\Databases\DatabasesBase;
|
||||
|
||||
class TablesDBConsoleClientTest extends Scope
|
||||
{
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases;
|
||||
namespace Tests\E2E\Services\TablesDB;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\DatabasesBase;
|
||||
|
||||
class TablesDBCustomClientTest extends Scope
|
||||
{
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases;
|
||||
namespace Tests\E2E\Services\TablesDB;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
use Tests\E2E\Services\Databases\DatabasesBase;
|
||||
|
||||
class TablesDBCustomServerTest extends Scope
|
||||
{
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Transactions;
|
||||
namespace Tests\E2E\Services\TablesDB\Transactions;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Transactions\ACIDBase;
|
||||
use Tests\E2E\Traits\DatabasesUrlHelpers;
|
||||
|
||||
class TablesDBACIDTest extends Scope
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Transactions;
|
||||
namespace Tests\E2E\Services\TablesDB\Transactions;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Transactions\TransactionPermissionsBase;
|
||||
|
||||
class TablesDBTransactionPermissionsCustomClientTest extends Scope
|
||||
{
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Transactions;
|
||||
namespace Tests\E2E\Services\TablesDB\Transactions;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideConsole;
|
||||
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
|
||||
use Tests\E2E\Traits\DatabasesUrlHelpers;
|
||||
|
||||
class TablesDBTransactionsConsoleClientTest extends Scope
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Transactions;
|
||||
namespace Tests\E2E\Services\TablesDB\Transactions;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideClient;
|
||||
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
|
||||
use Tests\E2E\Traits\DatabasesUrlHelpers;
|
||||
|
||||
class TablesDBTransactionsCustomClientTest extends Scope
|
||||
+2
-1
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\E2E\Services\Databases\Transactions;
|
||||
namespace Tests\E2E\Services\TablesDB\Transactions;
|
||||
|
||||
use Tests\E2E\Scopes\ApiTablesDB;
|
||||
use Tests\E2E\Scopes\ProjectCustom;
|
||||
use Tests\E2E\Scopes\Scope;
|
||||
use Tests\E2E\Scopes\SideServer;
|
||||
use Tests\E2E\Services\Databases\Transactions\TransactionsBase;
|
||||
use Tests\E2E\Traits\DatabasesUrlHelpers;
|
||||
|
||||
class TablesDBTransactionsCustomServerTest extends Scope
|
||||
Reference in New Issue
Block a user