Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix e2e tests #389

Merged
merged 2 commits into from
Oct 5, 2020
Merged

Bug Fix e2e tests #389

merged 2 commits into from
Oct 5, 2020

Conversation

codenio
Copy link
Contributor

@codenio codenio commented Oct 1, 2020

This Commit,

  • Fixes build failure due to e2e tests
ISSUE TYPE
  • Bug fix Pull Request
SUMMARY

Fixes #384

@codenio codenio force-pushed the bugfix/build-failure branch 2 times, most recently from c6b2e09 to fca0df5 Compare October 1, 2020 18:26
Copy link
Contributor

@sanketsudake sanketsudake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these changes are for further debugging of tests failure.

@codenio codenio force-pushed the bugfix/build-failure branch from fca0df5 to ca701de Compare October 2, 2020 03:05
@@ -104,11 +105,15 @@ func UpdateResource(t *testing.T, obj UpdateObjects) (*unstructured.Unstructured
if err != nil {
t.Fatalf("Failed to create %s: %v", obj.GVR.Resource, err)
}
// Provide Sufficient time interval for messages to reach fack servers
time.Sleep(30 * time.Second)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding sleep is not reliable and cleaner way.
We should have a retry logic with timeout to wait till the condition met

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

trying out possibilities to understand the problem with GitHub actions, since there is no issues with local testing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it is assured that it is due to lack of time for messages reaching fack servers, will work on logics and update here

@codenio
Copy link
Contributor Author

codenio commented Oct 2, 2020

I assume these changes are for further debugging of test failure.

yes @sanketsudake, The test cases are working fine in local, so trying to check through Github actions and debug further.
we need to hold this for now.

@codenio codenio force-pushed the bugfix/build-failure branch 7 times, most recently from 2ad4433 to 522d347 Compare October 2, 2020 08:20
This Commit,
- Fixes build failure due to e2e tests
- Fixes go vet suggestions
- changes webook's payload mutex from RLock to Lock to prevent data loss
- Add Mock time delays to allow propagation of events to all notifiers
@codenio codenio force-pushed the bugfix/build-failure branch from 522d347 to 87200d2 Compare October 2, 2020 08:26
@codenio
Copy link
Contributor Author

codenio commented Oct 2, 2020

Tried different possible ways of fixing this issue. Doing so, we can understand that, we need to Mock the time delay involved in listening, filtering, and notifying events to all notifiers or we need to test each notifier individually

verified the same with #268 as well, just by Mocking the event propagation time, this Issue is getting resolved

@PrasadG193 @sanketsudake thoughts and comments on this..?

@PrasadG193
Copy link
Collaborator

@codenio let's merge this fix for now so that other PRs will get unblocked. We will definitely have to revisit this and come up with a better solution

@mergify mergify bot merged commit b087f94 into kubeshop:develop Oct 5, 2020
@chetanpdeshmukh
Copy link

Hello @codenio ,
Thanks again for the PR!

Thank you for contributing to BotKube. Could you please fill out this form, so we can send the well deserved awesome swags 🙂

Team BotKube

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] e2e tests are flaky
4 participants