857. 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.

857.1 Files compared

# Location File Last Modified
1 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\record-update record-re-enrichment-util-itest-spec.js Mon Jul 10 17:46:22 2017 UTC
2 ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\record-update record-re-enrichment-util-itest-spec.js Tue Oct 3 12:55:22 2017 UTC

857.2 Comparison summary

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

857.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

857.4 Active regular expressions

No regular expressions were active.

857.5 Comparison detail

  1   'use stric t';
  2  
  3   require('. ./../../en v-setup');
  4  
  5   var ReEnri chUtil = r equire(glo bal.VX_ROO T + 'recor d-update/u tils/recor d-re-enric hment-util ');
  6   var log =  require(gl obal.VX_DU MMIES + '/ dummy-logg er');
  7  
  8   // Be sure  next line s are comm ented out  before pus hing
  9   // var log Util = req uire(globa l.VX_UTILS  + 'log');
  10   // log = l ogUtil._cr eateLogger ({
  11   //      na me: 'recod -re-enrich ment-util- itest',
  12   //      le vel: 'debu g'
  13   // });
  14  
  15   var JdsCli ent = requ ire(global .VX_SUBSYS TEMS + 'jd s/jds-clie nt');
  16   var _ = re quire('und erscore');
  17  
  18   var val =  require(gl obal.VX_UT ILS + 'obj ect-utils' ).getPrope rty;
  19   var syncAn dWaitForPa tient = re quire(glob al.VX_INTT ESTS + 'fr amework/ha ndler-test -framework ').syncAnd WaitForPat ient;
  20   var getBea nstalkConf ig = requi re(global. VX_INTTEST S + 'frame work/handl er-test-fr amework'). getBeansta lkConfig;
  21   var update Tubenames  = require( global.VX_ INTTESTS +  'framewor k/handler- test-frame work').upd ateTubenam es;
  22   var getTub enames = r equire(glo bal.VX_INT TESTS + 'f ramework/h andler-tes t-framewor k').getTub enames;
  23   var clearT ubes = req uire(globa l.VX_INTTE STS + 'fra mework/han dler-test- framework' ).clearTub es;
  24   var grabJo bs = requi re(global. VX_INTTEST S + 'frame work/job-g rabber');
  25   var moment  = require ('moment') ;
  26  
  27   var testCo nfig = req uire(globa l.VX_INTTE STS + 'tes t-config') ;
  28   var host =  testConfi g.vxsyncIP ;
  29  
  30   //Use the  main vxsyn c beanstal k for test ing, since  the recor d-update e nvironment  is run se parately
  31   var port =   PORT ;
  32  
  33   var wConfi g = requir e(global.V X_ROOT + ' worker-con fig');
  34   var config  = {
  35           sy ncRequestA pi: _.defa ults({
  36                    host : host
  37           },  wConfig.s yncRequest Api),
  38           vi staSites:  {
  39                    '9E7 A': _.clon e(wConfig. vistaSites ['9E7A'])
  40           },
  41           jd s: _.clone (wConfig.j ds)
  42   };
  43  
  44   var tubePr efix = 're cord-re-en richment-u til-test';
  45   var jobTyp e = 'recor d-update';
  46   var tubena mes;
  47  
  48   /*
  49           ** * Note ***
  50           Th is test re quires a p atient to  be synced  before it  can test t he utility .
  51           Th e patient  used here  is 9E7A;25 .
  52           Th is patient  will rema in synced  after the  test runs.
  53    */
  54  
  55   describe(' Record Re- Enrichment  util inte gration te st', funct ion() {
  56           it ('Verify u tility run s without  error', fu nction() {
  57                    var  pid = '9E7 A;25';
  58  
  59                    var  pids = [pi d];
  60                    var  updateTime  = moment( ).format(' YYYYMMDDHH mmss');
  61                    var  domains =  ['vital'];
  62                    var  referenceI nfo = {
  63                             sessio nId: 'Test ',
  64                             utilit yType: 'Re cord Re-En richment U til Integr ation Test '
  65                    };
  66  
  67                    var  jds = new  JdsClient( log, log,  config);
  68  
  69                    sync AndWaitFor Patient(lo g, config,  pid);
  70  
  71                    var  beanstalkC onfig = ge tBeanstalk Config(con fig, host,  port, tub ePrefix +  '-' + jobT ype);
  72                    upda teTubename s(beanstal kConfig);
  73  
  74                    tube names = ge tTubenames (beanstalk Config, [j obType]);
  75  
  76                    conf ig.beansta lk = beans talkConfig ;
  77  
  78                    var  handlerDon e = false;
  79                    runs (function( ) {
  80                             log.de bug('recor d-re-enric hment-util -itest-spe c: now tes ting handl er');
  81                             var re EnrichUtil  = new ReE nrichUtil( log, jds,  config, _. first(tube names));
  82  
  83                             reEnri chUtil.run Utility(pi ds, update Time, doma ins, refer enceInfo,  function(e rror) {
  84                                      expect(e rror).toBe Falsy();
  85  
  86                                      if (erro r) {
  87                                               handlerDon e = true;
  88                                               return;
  89                                      }
  90  
  91                                      grabJobs (log, host , port, tu benames, 2 , function (error, jo bs) {
  92                                               expect(err or).toBeFa lsy();
  93                                               expect(job s).toBeTru thy();
  94  
  95                                               var result JobTypes =  _.chain(j obs).map(f unction(re sult) {
  96                                                       re turn resul t.jobs;
  97                                               }).flatten ().pluck(' type').val ue();
  98  
  99                                               expect(val (resultJob Types, 'le ngth')).to BeGreaterT han(0);
  100                                               expect(res ultJobType s).toConta in(jobType );
  101  
  102                                               //Check ev ery job fo r referenc eInfo
  103                                               _.each(val (jobs, ['0 ', 'jobs'] ), functio n(job) {
  104                                                       ex pect(job.r eferenceIn fo).toEqua l(jasmine. objectCont aining({
  105                                                                sess ionId: ref erenceInfo .sessionId ,
  106                                                                util ityType: r eferenceIn fo.utility Type,
  107                                                                requ estId: jas mine.any(S tring)
  108                                                       }) );
  109                                               });
  110  
  111                                               handlerDon e = true;
  112                                      });
  113                             });
  114                    });
  115  
  116                    wait sFor(funct ion() {
  117                             return  handlerDo ne;
  118                    }, ' waiting fo r handler' , 10000);
  119           }) ;
  120  
  121           af terEach(fu nction() {
  122                    log. debug('rec ord-re-enr ichment-ut il-itest-s pec: Clean ing up...' );
  123  
  124                    var  cleared =  false;
  125  
  126                    clea rTubes(log , host, po rt, tubena mes, funct ion() {
  127                             cleare d = true;
  128                             log.de bug('recor d-re-enric hment-util -itest-spe c: **** cl earTube ca llback was  called.') ;
  129                    });
  130  
  131                    wait sFor(funct ion() {
  132                             return  cleared;
  133                    }, ' clear jobs  timed out ', 10000);
  134  
  135                    runs (function( ) {
  136                             log.de bug('recor d-re-enric hment-util -itest-spe c: **** te st complet e.');
  137                    });
  138           }) ;
  139   });