From dbda180a7898787ad65040a08ca891bc39b70424 Mon Sep 17 00:00:00 2001 From: Lawrence Forooghian Date: Thu, 20 Jun 2024 15:20:59 -0300 Subject: [PATCH] =?UTF-8?q?WIP=20UTS=20=E2=80=94=20Disable=20use=20of=20be?= =?UTF-8?q?stTransport=20/=20availableTransport=20private=20APIs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/common/modules/shared_helper.js | 17 +---------------- test/realtime/init.test.js | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/test/common/modules/shared_helper.js b/test/common/modules/shared_helper.js index 9a94ee6a0..63706ac88 100644 --- a/test/common/modules/shared_helper.js +++ b/test/common/modules/shared_helper.js @@ -95,25 +95,10 @@ define([ } get availableTransports() { - const helper = this.addingHelperFunction('availableTransports'); - return helper._availableTransports; - } - - get _availableTransports() { - this.recordPrivateApi('call.Utils.keysArray'); - this.recordPrivateApi('call.ConnectionManager.supportedTransports'); - this.recordPrivateApi('read.Realtime._transports'); - return utils.keysArray( - clientModule.Ably.Realtime.ConnectionManager.supportedTransports(clientModule.Ably.Realtime._transports), - ); + return ['web_socket']; } get bestTransport() { - const helper = this.addingHelperFunction('bestTransport'); - return helper._bestTransport; - } - - get _bestTransport() { return this.availableTransports[0]; } diff --git a/test/realtime/init.test.js b/test/realtime/init.test.js index a4ae66197..e02b26968 100644 --- a/test/realtime/init.test.js +++ b/test/realtime/init.test.js @@ -353,7 +353,7 @@ define(['ably', 'shared_helper', 'chai'], function (Ably, Helper, chai) { try { realtime = helper.AblyRealtime({ transports: helper.availableTransports }); helper.recordPrivateApi('read.connectionManager.baseTransport'); - expect(realtime.connection.connectionManager.baseTransport).to.equal('comet'); + expect(realtime.connection.connectionManager.baseTransport).to.equal('web_socket'); helper.recordPrivateApi('read.connectionManager.webSocketTransportAvailable'); expect(realtime.connection.connectionManager.webSocketTransportAvailable).to.be.ok; helper.closeAndFinish(done, realtime);