mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
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:
1 parent
b459884ebb
commit
082e33a529
1 file changed
+2
-2
@@ -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'))
|
||||
|
||||
Reference in new issue
Block a user