opentok / opentok-network-test-js

A node module that lets you check network connectivity to resources and services required to use OpenTok
MIT License
57 stars 44 forks source link

Timeout value is not evaluated in testQuality and AudioOnly #127

Open enricop89 opened 4 years ago

enricop89 commented 4 years ago

Hi,

There is a bug when you set a custom timeout in the OTNetworkTest() constructor for an audio-only test. The user can set a value between 10s and 30s, but the code will always take 10s (because testTimeout for audio-only is 10s).

https://github.com/opentok/opentok-network-test-js/blob/e8c5a0d87070239b4aeb5c27a2bad04f8a9c09f4/src/NetworkTest/testQuality/index.ts#L308

Steps to reproduce:

var options = { audioOnly: true, timeout: 15000};
const otNetworkTest = new NetworkTest(OT, sessionInfo, options);
otNetworkTest.testQuality();
jeffswartz commented 4 years ago

Good catch, @enricop89. I am wondering if we should just update the docs to say that the maximum length of an audio-only tests is 10 seconds. 10 seconds should be enough time to determine audio quality.... Or have you encountered conditions where more time would be appropriate?

enricop89 commented 4 years ago

@jeffswartz I agree on update the docs. In audio-only cases, I would say 10s are enough