apache / openwhisk-package-kafka

Apache OpenWhisk package for communicating with Kafka or Message Hub
https://openwhisk.apache.org/
Apache License 2.0
32 stars 43 forks source link

Fix tests that fire trigger when message is consumed #244

Closed dubee closed 6 years ago

dubee commented 6 years ago

Tests poll for 100 activations matching triggerName for maxRetries. Doing this means we have to worry about the clock for the backend being in sync with the machine the health test runs on. Instead we can just get the last x related activations in one request and repeat the test maxRetries until we get the activation ID we are looking for.

Also we may have more than one matching activation due to the retry loop.

dubee commented 6 years ago

@jberstler, any thoughts on this?

dubee commented 6 years ago

Ah, I see. We are spamming the backend Whisk server with activation list requests with pollFor when we can just do a timeout based from 60 * maxRetries then do one activation list.