@@ -65,19 +65,21 @@ download(ccUrl, ccTempFile, function(error, bytes) {
6565 fail ( ) ;
6666 }
6767 console . log ( " ✔ Download complete: " + ccTempFile + " (" + parseInt ( bytes / mb , 10 ) + " mb)\n" ) ;
68- require ( "sleep" ) . sleep ( 1 ) ;
69- console . log ( " Unpacking " + ccTempFile + " ..." ) ;
70- unpack ( ccTempFile , function ( error ) {
71- if ( error ) {
72- console . log ( " ✖ Unpack failed: " + error + "\n" ) ;
73- fail ( ) ;
74- }
75- require ( "sleep" ) . sleep ( 1 ) ; // Let the entry callbacks finish
76- console . log ( " ✔ Unpack complete.\n" ) ;
77- configure_jre ( ) ;
78- } , function ( entry ) {
79- console . log ( " | " + entry [ "path" ] ) ;
80- } ) ;
68+ setTimeout ( function ( ) {
69+ console . log ( " Unpacking " + ccTempFile + " ..." ) ;
70+ unpack ( ccTempFile , function ( error ) {
71+ if ( error ) {
72+ console . log ( " ✖ Unpack failed: " + error + "\n" ) ;
73+ fail ( ) ;
74+ }
75+ setTimeout ( function ( ) { // Let the entry callbacks finish
76+ console . log ( " ✔ Unpack complete.\n" ) ;
77+ configure_jre ( ) ;
78+ } , 1000 ) ;
79+ } , function ( entry ) {
80+ console . log ( " | " + entry [ "path" ] ) ;
81+ } ) ;
82+ } , 1000 ) ;
8183} , function ( bytes , total ) {
8284 currentBytes += bytes ;
8385 if ( currentBytes == bytes || currentBytes - lastBytes >= mb ) {
@@ -114,20 +116,22 @@ function configure_jre() {
114116 fail ( ) ;
115117 }
116118 console . log ( " ✔ Download complete: " + jreTempFile + " (" + parseInt ( bytes / mb , 10 ) + " mb)\n" ) ;
117- require ( "sleep" ) . sleep ( 1 ) ;
118- console . log ( " Unpacking " + jreTempFile + " ..." ) ;
119- unpack ( jreTempFile , function ( error ) {
120- if ( error ) {
121- console . log ( " ✖ Unpack failed: " + error + "\n" ) ;
122- fail ( ) ;
123- }
124- require ( "sleep" ) . sleep ( 1 ) ; // Let the entry callbacks finish
125- console . log ( " ✔ Unpack complete.\n" ) ;
126- configure ( ) ;
127- runTest ( true ) ;
128- } , function ( entry ) {
129- console . log ( " | " + entry [ "path" ] ) ;
130- } ) ;
119+ setTimeout ( function ( ) {
120+ console . log ( " Unpacking " + jreTempFile + " ..." ) ;
121+ unpack ( jreTempFile , function ( error ) {
122+ if ( error ) {
123+ console . log ( " ✖ Unpack failed: " + error + "\n" ) ;
124+ fail ( ) ;
125+ }
126+ setTimeout ( function ( ) { // Let the entry callbacks finish
127+ console . log ( " ✔ Unpack complete.\n" ) ;
128+ configure ( ) ;
129+ runTest ( true ) ;
130+ } , 1000 ) ;
131+ } , function ( entry ) {
132+ console . log ( " | " + entry [ "path" ] ) ;
133+ } ) ;
134+ } , 1000 ) ;
131135 } , function ( bytes , total ) {
132136 currentBytes += bytes ;
133137 if ( currentBytes == bytes || currentBytes - lastBytes >= mb ) {
0 commit comments