Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Increase timeout for connectivity tests and add error message #130

Merged
merged 6 commits into from
Oct 28, 2015

Conversation

KaptenJansson
Copy link
Contributor

Fixes #52

@andresusanopinto
Copy link
Contributor

Since you are improving this test please do it properly... there is a lot of issues with it.
1 - it does not closes the call when the test is done.
2 - if it timeouts it call reportFatal, but later on the test could continue and call reportFatal again. Using reportFatal is just dangerous (we should remove it), there should be a clear end path for the test.

this.state = 'warning';
} else if (this.isDisabled) {
this.state = 'disabled';
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

else { failure }

if (event.data !== 'world') {
reportFatal();
reportError('Data not transmitted.');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit but shouldn't the message read "Invalid data transmitted?"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes indeed ;)

var call = new Call(config);
call.setIceCandidateFilter(iceCandidateFilter);

// Collect all candidate for validation.
call.pc1.onicecandidate = function(event) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I prefer addEventListener('icecandidate', {...} ), I find it less error-prone in case there is multiple listeners.
Also it is used way more along this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes sorry about that, should have ofc used addEventListener (I usually do...)

@KaptenJansson
Copy link
Contributor Author

I'm gonna merge this now. Next up I will make a PR where the test object is passed to the test so that we do not have to use global report methods.

KaptenJansson added a commit that referenced this pull request Oct 28, 2015
Increase timeout for connectivity tests and add error message
@KaptenJansson KaptenJansson merged commit 4602891 into master Oct 28, 2015
@KaptenJansson KaptenJansson deleted the increaseTimeout branch October 28, 2015 12:05
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants