Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Current »

Problem

When running unit tests “failed to execute” is reported and the test aborts with an exception similar to the following:

Failed to execute job 'jb_ext_eenr_acct_hist' for unit testing: 
com.datamigratorsmettle.services.dsexecute.RunnableJobException: 
Service operation failed when performing action 'jobruns/latest' for resource 
'jobdesigns/P1EHOWLD2601/CLR_ODS_DLY/Jobs/Extract/jb_ext_eenr_acct_hist'
at com.datamigrators.mettle.services.dsexecute.rest.RestRunnableJob.getLatestJobRun(SourceFile:298)
at com.datamigrators.mettle.services.dsexecute.rest.RestRunnableJob.executeJob(SourceFile:245


or in the results you may see an exception similar to the following:

Failed to execute job 'TR_ORDERS' for unit testing: com.datamigrators.mettle.services.dsexecute.RunnableJobException: Service operation failed when performing action 'jobruns/latest' for resource 'jobdesigns/DEMO4-ENGN.DATAMIGRATORS.IO/wwi_jenkins_ds117_ci/Jobs/Transform/TR_ORDERS'
at com.datamigrators.mettle.services.dsexecute.rest.RestRunnableJob.getLatestJobRun(SourceFile:298)
at com.datamigrators.mettle.services.dsexecute.rest.RestRunnableJob.executeJob(SourceFile:245)
at com.datamigrators.mettle.services.dsexecute.rest.RestRunnableJob.run(SourceFile:191)
at com.datamigrators.plugin.dstest.process.UnitTestRunner.call(SourceFile:115)

Cause

The Command / Bamboo Task for running Unit Tests as part of a CI/CD pipeline is expected to run a lot of short lived DataStage jobs in quick succession. To reduce the processing overhead introduced by running a lot of concurrent instances of dsjob, MettleCI will attempt to use the DataStage Operations Console API. When the DataStage Operations Console is unavailable or disabled, MettleCI will execute Unit Tests using the less efficient dsjob command.

If DataStage Operations Console is enabled but not fully functioning, eg. there are one or more services not running, the responses MettleCI receives during a job execution will be inconsistent, and will result in exceptions like those shown above.

Solution

Restarting the Operations Console AppWatcher will typically sort this issue, at least until the next time the Operations Console fails. It may be advisable to investigate why the console fails, if it happens repeatedly.

  • No labels