You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by alsorokin <gi...@git.apache.org> on 2015/06/30 17:22:42 UTC

[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

GitHub user alsorokin opened a pull request:

    https://github.com/apache/cordova-android/pull/188

    CB-9172 Improved emulator deploy stability

    This is a fix for https://issues.apache.org/jira/browse/CB-9172
    - Use UUID to distinguish between launched emulators
    - Wait for android.process.acore instead of init.svc.bootanim on emulator boot
    - Increased retry timeout when installing app to the emulator
    - If there is already a started/starting emulator, wait for it's boot instead of trying to deploy to it right away

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/MSOpenTech/cordova-android CB-9172

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-android/pull/188.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #188
    
----
commit e3bbea0135ede7130e42c311b4a316765db0ac76
Author: alsorokin <al...@akvelon.com>
Date:   2015-06-30T15:09:24Z

    CB-9172 Improved emulator deploy stability
    
    - Use UUID to distinguish between launched emulators
    - Wait for android.process.acore instead of init.svc.bootanim on emulator boot
    - Increased retry timeout when installing app to the emulator
    - If there is already a started/starting emulator, wait for it's boot instead of trying to deploy to it right away

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/188#discussion_r33834730
  
    --- Diff: bin/templates/cordova/lib/emulator.js ---
    @@ -238,13 +242,13 @@ module.exports.wait_for_emulator = function(num_running) {
      */
     module.exports.wait_for_boot = function(emulator_id) {
         var self = this;
    -    return exec('adb -s ' + emulator_id + ' shell getprop init.svc.bootanim', os.tmpdir())
    +    return exec('adb -s ' + emulator_id + ' shell ps', os.tmpdir())
         .then(function(output) {
    -        if (output.match(/stopped/)) {
    +        if (output.match(/android\.process\.acore/)) {
                 return;
             } else {
                 process.stdout.write('.');
    -            return Q.delay(3000).then(function() {
    +            return Q.delay(7000).then(function() {
    --- End diff --
    
    Wonder if doing this every 3 seconds might still be a good idea - why decrease this polling frequency?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-android/pull/188


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/188#discussion_r33834705
  
    --- Diff: bin/templates/cordova/lib/emulator.js ---
    @@ -238,13 +242,13 @@ module.exports.wait_for_emulator = function(num_running) {
      */
    --- End diff --
    
    This comment needs to be updated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/188#discussion_r33845281
  
    --- Diff: bin/templates/cordova/lib/emulator.js ---
    @@ -238,13 +242,13 @@ module.exports.wait_for_emulator = function(num_running) {
      */
    --- End diff --
    
    Done


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by alsorokin <gi...@git.apache.org>.
Github user alsorokin commented on a diff in the pull request:

    https://github.com/apache/cordova-android/pull/188#discussion_r33843283
  
    --- Diff: bin/templates/cordova/lib/emulator.js ---
    @@ -238,13 +242,13 @@ module.exports.wait_for_emulator = function(num_running) {
      */
     module.exports.wait_for_boot = function(emulator_id) {
         var self = this;
    -    return exec('adb -s ' + emulator_id + ' shell getprop init.svc.bootanim', os.tmpdir())
    +    return exec('adb -s ' + emulator_id + ' shell ps', os.tmpdir())
         .then(function(output) {
    -        if (output.match(/stopped/)) {
    +        if (output.match(/android\.process\.acore/)) {
                 return;
             } else {
                 process.stdout.write('.');
    -            return Q.delay(3000).then(function() {
    +            return Q.delay(7000).then(function() {
    --- End diff --
    
    From my observations, `shell ps` (getting the list of all processes) is more time consuming than `shell getprop` (getting one property) so I increased the polling time.
    This is only my feeling, we can safely return it back to 3s I think.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on the pull request:

    https://github.com/apache/cordova-android/pull/188#issuecomment-126652794
  
    LGTM. This has been up on the staging CI for a while, and I haven't been seeing issues. Thus, letting it lose on the real CI.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on the pull request:

    https://github.com/apache/cordova-android/pull/188#issuecomment-126653827
  
    Merged. Feel free to delete the branch.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-android pull request: CB-9172 Improved emulator deploy sta...

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on the pull request:

    https://github.com/apache/cordova-android/pull/188#issuecomment-119036955
  
    @dblotsky Can you please help review and merge?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org