873. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/3/2017 11:16:02 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

873.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\utils healthcheck-utils-itest-spec.js Tue Jan 10 16:20:50 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\utils healthcheck-utils-itest-spec.js Tue Oct 3 13:14:03 2017 UTC

873.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 316
Changed 1 4
Inserted 0 0
Removed 0 0

873.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

873.4 Active regular expressions

No regular expressions were active.

873.5 Comparison detail

  1   'use stric t';
  2  
  3   require('. ./../../en v-setup');
  4   var health check = re quire(glob al.VX_UTIL S + 'healt hcheck-uti ls');
  5   var dummyL og = requi re(global. VX_DUMMIES  + 'dummy- logger');
  6   var JdsCli ent = requ ire(global .VX_SUBSYS TEMS + 'jd s/jds-clie nt');
  7  
  8   var wConfi g = requir e(global.V X_ROOT + ' worker-con fig');
  9   var _ = re quire('und erscore');
  10  
  11   // dummyLo g = requir e('bunyan' ).createLo gger({
  12   //     nam e: 'health check-util s-itest-sp ec',
  13   //     lev el: 'debug '
  14   // });
  15  
  16   var config  = {
  17       health check: {
  18           he artbeatEna bled: true ,
  19           he artbeatInt ervalMilli s: 300000,
  20           he artbeatSta leAgeMilli s: 600000
  21       },
  22       jds: _ .defaults( wConfig.jd s, {
  23           pr otocol: 'h ttp',
  24             host: ' IP          ',
  25             port:  PORT
  26       })
  27   };
  28  
  29   describe(' healthchec k-utils-it est-spec',  function( ) {
  30       descri be('sendHe artbeat',  function()  {
  31           va r jds = ne w JdsClien t(dummyLog , dummyLog , config);
  32           va r env = {
  33                jds: jds ,
  34                metrics:  dummyLog,
  35           };
  36  
  37           be foreEach(f unction()  {
  38                var done  = false;
  39                runs(fun ction() {
  40                    env. jds.delete Operationa lDataMutab le('dummy- process',  function()  {
  41                         done = tru e;
  42                    });
  43                });
  44                waitsFor (function( ) {
  45                    retu rn done;
  46                });
  47           }) ;
  48  
  49           it ('Normal P ath', func tion() {
  50                spyOn(du mmyLog, 'e rror');
  51                var done  = false;
  52  
  53                runs(fun ction() {
  54                    heal thcheck.se ndHeartbea t(dummyLog , config,  env, 'dumm y-process' , 'dummy-p rofile', 1 234, '2015 0715014231 ', functio n() {
  55                         expect(dum myLog.erro r).not.toH aveBeenCal led();
  56                         done = tru e;
  57                    });
  58                });
  59  
  60                waitsFor (function( ) {
  61                    retu rn done;
  62                });
  63  
  64                var done 2 = false;
  65  
  66                runs(fun ction() {
  67                    env. jds.getOpe rationalDa taMutable( 'dummy-pro cess', fun ction(err,  response,  result) {
  68                         expect(res ult).toEqu al({
  69                             _id: ' dummy-proc ess',
  70                             profil e: 'dummy- profile',
  71                             proces s: 1234,
  72                             proces sStartTime : '2015071 5014231',
  73                             heartb eatTime: j asmine.any (String)
  74                         });
  75                         done2 = tr ue;
  76                    });
  77                });
  78  
  79                waitsFor (function( ) {
  80                    retu rn done2;
  81                });
  82           }) ;
  83  
  84           af terEach(fu nction() {
  85                var done  = false;
  86                runs(fun ction() {
  87                    env. jds.delete Operationa lDataMutab le('dummy- process',  function()  {
  88                         done = tru e;
  89                    });
  90                });
  91                waitsFor (function( ) {
  92                    retu rn done;
  93                });
  94           }) ;
  95       });
  96       descri be('retrie veHeartbea ts', funct ion() {
  97  
  98           va r jds = ne w JdsClien t(dummyLog , dummyLog , config);
  99           va r env = {
  100                jds: jds ,
  101                metrics:  dummyLog,
  102           };
  103  
  104           va r testHear tbeat = {
  105                _id: 'du mmy-proces s2',
  106                profile:  'dummy',
  107                process:  4435,
  108                processS tartTime:  '201507171 12412',
  109                heartbea tTime: '20 1507171127 12'
  110           };
  111  
  112           be foreEach(f unction()  {
  113                var done  = false;
  114                runs(fun ction() {
  115                    env. jds.delete Operationa lDataMutab le('dummy- process2',  function( ) {
  116                         done = tru e;
  117                    });
  118                });
  119                waitsFor (function( ) {
  120                    retu rn done;
  121                });
  122  
  123                var done 2 = false;
  124                runs(fun ction() {
  125                    env. jds.storeO perational DataMutabl e(testHear tbeat, fun ction() {
  126                         done2 = tr ue;
  127                    });
  128                });
  129                waitsFor (function( ) {
  130                    retu rn done2;
  131                });
  132           }) ;
  133  
  134           it ('Normal P ath', func tion() {
  135                var done  = false;
  136                healthch eck.retrie veHeartbea ts(dummyLo g, config,  env, func tion(err,  res) {
  137                    expe ct(err).to BeFalsy();
  138                    expe ct(res).to BeTruthy() ;
  139                    expe ct(res.ite ms).toBeTr uthy();
  140                    expe ct(res.ite ms).toCont ain(testHe artbeat);
  141                    done  = true;
  142                });
  143                waitsFor (function( ) {
  144                    retu rn done;
  145                });
  146           }) ;
  147  
  148           af terEach(fu nction() {
  149                var done  = false;
  150                runs(fun ction() {
  151                    env. jds.delete Operationa lDataMutab le('dummy- process2',  function( ) {
  152                         done = tru e;
  153                    });
  154                });
  155                waitsFor (function( ) {
  156                    retu rn done;
  157                });
  158           }) ;
  159       });
  160   });