-
Notifications
You must be signed in to change notification settings - Fork 92
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
Switching from offline back to online #40
Comments
@gingo could you please add better description, looks like we are facing same problem |
Please try to formulate question. What details do you need? |
How can be a method "offline"? Is it about internet state? |
Yes, networking is failing as mentioned in comment. There is probably some delay when calling this methods:
I guess, TestButtler should wait before wifi is in desired state and then return from this methods. |
It takes some time for android OS to actually disable internet - so we are using something like this:
But sometimes internet do not coming back - even after 1 minute of waiting |
I am having the same issue. The problem is that the test that disables the internet breaks down the following test although I am calling both setGsmState(true) and setWifiState(true) before the following tests. The only way to fix this for now is to test offline test in a separate test class. |
I'm having the exact same problem as well. The first test will shutoff the wifi, and then re-enable it to do some network calls (which are successful). However the next test will have network calls time out. |
I have made an Idling Resource to halt test until required connectivity state is met check it out here https://github.com/kushsaini10/connectivity-idling-resource |
Hi there!
I have this two methods in my test-class:
Method
loadContentOffline()
is started first and even if internet connectivity is reenabled again the second method is offline. It works with Thread.sleep().The text was updated successfully, but these errors were encountered: