Skip to content

Commit b500a0f

Browse files
author
Joanna Grycz
committed
refactor: refactor code in labels allocation sample
1 parent e3f92a3 commit b500a0f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

batch/create/create_batch_labels_allocation.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,7 @@ async function main() {
117117
// [END batch_labels_allocation]
118118
}
119119

120-
process.on('unhandledRejection', err => {
120+
main().catch(err => {
121121
console.error(err.message);
122122
process.exitCode = 1;
123123
});
124-
125-
main();

batch/test/create_batch_labels_allocation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ describe('Create batch labels allocation', async () => {
4141

4242
it('should create a new job with allocation policy labels', async () => {
4343
const expectedAllocationLabels = {
44-
'batch-job-id': 'batch-labels-allocation-job',
44+
'batch-job-id': jobName,
4545
vm_label_name_1: 'vmLabelValue1',
4646
vm_label_name_2: 'vmLabelValue2',
4747
};

0 commit comments

Comments
 (0)