A similar issue occurred to us as issue 
<https://issues.jenkins-ci.org/browse/JENKINS-27456?jql=project%20%3D%20JENKINS%20AND%20component%20%3D%20android-emulator-plugin%20ORDER%20BY%20updated%20DESC%2C%20priority%20DESC%2C%20created%20ASC>:27456.
 
The emulator is sometimes connected successfully, but sometimes appears 
device offline. It makes the testing unstable and became a problem. 

I have tested using the same procedures as how jenkins launch and connect 
to emulator with an assigned port number- xxxxx: 
- adb start-server
- launch emulator with localhost:xxxxx
- adb connect localhost:xxxxx
- adb -s localhost:xxxxx shell ...

And the offline situation somehow happens when adb connects to 
emulator-xxxxx instead of our desired localhost:xxxxx port. And caused 
Jenkins build failed without a connected emulator at the specified port 
before timedout. I assumed the launch was connected to console port ( 
emulator-xxxxx) before adb connecting to localhost:xxxxx takes action( it 
is how i reproduce device offline). I'm new to Jenkins and wondering if 
there is some method i can apply to the Jenkins Android Emulator Plugin to 
allow it restart adb when it is failing to connect to device at the port ( 
as this action allows reconnection to port during my manual test.) while it 
now only tries to disconnect/connect to the port and this is not helpful in 
this case.

Any advice is really appreciated!!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/22bb03ec-35a3-4161-9ff5-05ba20cc835b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to