Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable automatic token refreshing for tests #181

Closed
marcoow opened this issue May 29, 2014 · 9 comments
Closed

Disable automatic token refreshing for tests #181

marcoow opened this issue May 29, 2014 · 9 comments
Assignees
Milestone

Comments

@marcoow
Copy link
Member

marcoow commented May 29, 2014

As it causes problems (see #35), also it might actually randomly break tests.

@johnnyshields
Copy link

@marcoow your commit 75a73a6 affects our tests. can we make this behavior a config variable rather than hardcoding to if (!Ember.testing)?

@marcoow
Copy link
Member Author

marcoow commented Jul 19, 2016

@johnnyshields: hm, why would you ever want that to run in tests?

@johnnyshields
Copy link

for long-running integration tests which test performance. I think the question is really "why would a library hardcode its behavior to not run in tests, rather than making it configurable?" Its fine if the default config is false for test env, true for non-test so as to affect existing users.

@marcoow
Copy link
Member Author

marcoow commented Jul 19, 2016

I get your point - changing the behavior of sth. if it's running in test env isn't ideal but at the same time a pretty common pattern in Ember.js as you have to make sure tests are not leaking and run loop events.

I think if you're running long-running integration tests to test performance you shouldn't be running the app in test env anyway though as it will behave differently and might give you a wrong sense of its performance even (for example, ESA will always store the session in memory when running in test mode which of course is much faster than using localStorage or a cookie).

@johnnyshields
Copy link

@marcoow can we make this a config?

@marcoow
Copy link
Member Author

marcoow commented Jul 19, 2016

@johnnyshields: I honestly don't see the need for doing that

@johnnyshields
Copy link

could we make a more general config test_mode which replaces all usages of Ember.testing within the library, which by default is set to the value of Ember.testing but can be overridden, so that we are not tightly coupled to Ember itself?

@marcoow
Copy link
Member Author

marcoow commented Jul 19, 2016

@johnnyshields: I honestly don't see the need for doing that. As I said above - when you're executing long-running integration tests, specifically for performance testing you shouldn't be running the app in test mode anyway.

@johnnyshields
Copy link

I pray for the day when the Ember community will learn the merits of loose coupling.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants