Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit 7d2d036

Browse files
author
Andres
committed
Add retries
1 parent 1669a51 commit 7d2d036

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

deploy/kubelessDeploy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ class KubelessDeploy {
438438
// don't try to add an ingress rule
439439
return new BbPromise((r) => r());
440440
}
441-
if (_.isEmpty(event[eventType])) {
441+
if (_.isUndefined(event[eventType])) {
442442
throw new Error(
443443
`Wrong defintion for the event ${event}. ` +
444444
'Expecting an Object with valid keys.'

test/examples-test.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,6 @@ describe('Examples', () => {
101101
let index = 0;
102102
cwd = path.join('/tmp', moment().valueOf().toString());
103103
fs.mkdirSync(cwd);
104-
exec('kubeless topic create hello_topic', (err, stdout) => {
105-
console.log('TOPIC CREATION STDOUT: ', stdout);
106-
});
107104
console.log(' Deploying examples');
108105
_.each(examples, (example) => {
109106
/* eslint no-param-reassign: ["error", { "props": false }]*/
@@ -218,17 +215,11 @@ describe('Examples', () => {
218215
describe('event-trigger-python', function () {
219216
this.timeout(15000);
220217
it('should get a submmited message "hello world"', (done) => {
218+
this.retry(3);
221219
setTimeout(() => {
222220
exec(
223221
'kubeless topic publish --topic hello_topic --data "hello world"',
224222
(err, stdout) => {
225-
console.log('STDOUT: ', stdout);
226-
exec('kubectl describe pod kafka-0 -n kubeless', (derr, describe) => {
227-
console.log(describe);
228-
});
229-
exec('kubectl get pods -n kubeless', (gerr, pods) => {
230-
console.log(pods);
231-
});
232223
if (err) {
233224
console.error(stdout);
234225
throw err;

0 commit comments

Comments
 (0)