Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Cancel pending timeouts so that protractor can continue #35

Closed
wants to merge 2 commits into from

Conversation

frankwallis
Copy link

When using protractor for e2e testing it waits for all pending timeouts to complete and only then will it move on to the next test. For this reason it is important to cancel any timeouts which have been set when they are no longer needed. Currently my tests wait for 10 seconds even though they have received the correct response from the event bus.

This change cancels the send timeout when resolving/rejecting the promise returned and allows protractor to continue once the reply has been received.

An alternative solution would be to use the $interval service instead as I believe that protractor does not wait for these. (angular/protractor#169)

next.displayName = "#{CONSTANTS.MODULE}/#{CONSTANTS.COMPONENT}: util.send (ensureOpenAuthConnection callback)"
dispatched = ensureOpenAuthConnection next
if deferred and !dispatched then deferred.reject()
if deferred and !dispatched
Copy link
Collaborator

Choose a reason for hiding this comment

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

Line ends with trailing whitespace

@knalli
Copy link
Owner

knalli commented Jan 2, 2015

Thank you, I will take a look into this in the next days.

Anyway, if you want you contribution being accepted, you have to fork canary, apply the fixes onto that fork any make a PR against my canary. =

@frankwallis
Copy link
Author

Hi, sorry I should have read the guidelines but I I was under the clock last week. I have submitted a new request to canary and I'm closing this one. Many thanks.

@frankwallis frankwallis closed this Jan 9, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants