File tree Expand file tree Collapse file tree
test-result-summary-client/src/Build Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,11 +105,19 @@ const Build = () => {
105105 let testResult = [ ] ;
106106 if ( builds [ 0 ] . tests !== undefined ) {
107107 testResult = builds [ 0 ] . tests . map ( ( test ) => {
108+ let duration = test . duration ;
109+ if ( ! duration ) {
110+ if ( ! test . startTime ) {
111+ duration = null ;
112+ } else {
113+ duration = Infinity ;
114+ }
115+ }
108116 const ret = {
109117 key : test . _id ,
110118 sortName : test . testName ,
111119 testName : test . testName ,
112- duration : test . duration ,
120+ duration,
113121 machine : builds [ 0 ] . machine ,
114122 sortMachine : builds [ 0 ] . machine ,
115123 buildName : buildData [ 0 ] . buildName ,
Original file line number Diff line number Diff line change 11export default function renderDuration ( ms ) {
22 if ( ms === null ) {
33 return 'N/A' ;
4+ } else if ( ms === Infinity ) {
5+ return 'Hang suspected' ;
46 }
57 const milliseconds = parseInt ( ms % 1000 , 10 ) ;
68 const seconds = parseInt ( ( ms / 1000 ) % 60 , 10 ) ;
You can’t perform that action at this time.
0 commit comments