@@ -38,6 +38,10 @@ export default class LambdaRestService {
3838 if ( ! this . isServiceEnabled ) {
3939 return ;
4040 }
41+ if ( test . title ) {
42+ this . testTitle = test . title
43+ }
44+
4145
4246 if ( this . suiteTitle === 'Jasmine__TopLevel__Suite' ) {
4347 this . suiteTitle = test . fullName . slice ( 0 , test . fullName . indexOf ( test . title ) - 1 ) ;
@@ -88,12 +92,12 @@ export default class LambdaRestService {
8892
8993 if ( ! global . browser . isMultiremote ) {
9094 log . info ( `Update job with sessionId ${ global . browser . sessionId } , ${ status } ` ) ;
91- return this . updateJob ( global . browser . sessionId , failures ) ;
95+ return this . _update ( global . browser . sessionId , failures ) ;
9296 }
9397
9498 return Promise . all ( Object . keys ( this . capabilities ) . map ( browserName => {
9599 log . info ( `Update multiremote job for browser '${ browserName } ' and sessionId ${ global . browser [ browserName ] . sessionId } , ${ status } ` ) ;
96- return this . updateJob ( global . browser [ browserName ] . sessionId , failures , false , browserName ) ;
100+ return this . _update ( global . browser [ browserName ] . sessionId , failures , false , browserName ) ;
97101 } ) ) ;
98102 }
99103
@@ -106,12 +110,20 @@ export default class LambdaRestService {
106110
107111 if ( ! global . browser . isMultiremote ) {
108112 log . info ( `Update (reloaded) job with sessionId ${ oldSessionId } , ${ status } ` ) ;
109- return this . updateJob ( oldSessionId , this . failures , true ) ;
113+ return this . _update ( oldSessionId , this . failures , true ) ;
110114 }
111115
112116 const browserName = global . browser . instances . filter ( browserName => global . browser [ browserName ] . sessionId === newSessionId ) [ 0 ] ;
113117 log . info ( `Update (reloaded) multiremote job for browser '${ browserName } ' and sessionId ${ oldSessionId } , ${ status } ` ) ;
114- return this . updateJob ( oldSessionId , this . failures , true , browserName ) ;
118+ return this . _update ( oldSessionId , this . failures , true , browserName ) ;
119+ }
120+
121+ async _update ( sessionId , failures , calledOnReload = false , browserName ) {
122+
123+ const sleep = ms => new Promise ( r => setTimeout ( r , ms ) ) ;
124+ await sleep ( 5000 )
125+ return await this . updateJob ( sessionId , failures , calledOnReload = false , browserName ) ;
126+
115127 }
116128
117129 async updateJob ( sessionId , failures , calledOnReload = false , browserName ) {
@@ -136,7 +148,12 @@ export default class LambdaRestService {
136148 getBody ( failures , calledOnReload = false , browserName ) {
137149 let body = { } ;
138150 if ( ! ( ! global . browser . isMultiremote && this . capabilities . name || global . browser . isMultiremote && this . capabilities [ browserName ] . capabilities . name ) ) {
139- body . name = this . suiteTitle ;
151+
152+ body . name = this . suiteTitle + ' - ' + this . testTitle
153+
154+ if ( this . capabilities [ 'LT:Options' ] && this . capabilities [ 'LT:Options' ] . name ) {
155+ body . name = this . capabilities [ 'LT:Options' ] . name
156+ }
140157
141158 if ( browserName ) {
142159 body . name = `${ browserName } : ${ body . name } ` ;
0 commit comments