test(mqtt): upgrade the WebSocket carrier at the root, not /push

The WS transport is addressed by its dedicated TLS port, not a URL path, so the client
upgrades at / rather than /push.
This commit is contained in:
ArnabChatterjee20k committed 2026-09-18 12:10:15 +05:30
1 parent b459884ebb
commit 082e33a529
1 file changed
+2 -2
+2 -2
View File
@@ -416,7 +416,7 @@ final class MqttServerTest extends Scope
/**
* MQTT over WebSocket: browser clients reach the broker through its WebSocket listener
* (appwrite-mqtt:8083, routed as ws(s)://<host>/push) instead of raw TCP. The same
* (appwrite-mqtt:8083, exposed as wss://<host>:8084 on its own TLS port) instead of raw TCP. The same
* enhanced-auth CONNECT and SUBSCRIBE exchange must work with each MQTT packet carried in
* a WebSocket binary frame, exercising the broker's WebSocket transport, packet reassembly
* and framed send in both directions.
@@ -439,7 +439,7 @@ final class MqttServerTest extends Scope
run(function () use ($projectId, $jwt, $userId, $topicId, &$connackReason, &$codes) {
$client = new WebSocketClient(self::BROKER_HOST, self::BROKER_WS_PORT);
$client->set(['timeout' => 10]);
$this->assertTrue($client->upgrade('/push'), 'websocket upgrade failed');
$this->assertTrue($client->upgrade('/'), 'websocket upgrade failed');
$properties = (new Properties())
->add(new Property(Property::AUTHENTICATION_METHOD, 'appwrite-jwt'))