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

Add retry in templates to wait realtime notifications #161

Merged
merged 45 commits into from
Nov 30, 2018

Conversation

Aschen
Copy link
Contributor

@Aschen Aschen commented Nov 23, 2018

⚠️ depends on #169 ⚠️

What does this PR do?

Add retry in templates to wait realtime notifications

@Aschen Aschen self-assigned this Nov 23, 2018
@Aschen Aschen changed the title Add sleep to wait notifications Add sleep to wait realtime notifications Nov 23, 2018
Copy link
Contributor

@scottinet scottinet left a comment

Choose a reason for hiding this comment

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

a single sleep is not enough, we need a retry mechanism

@kuzzle
Copy link
Contributor

kuzzle commented Nov 23, 2018

Snippets tests reports

SDK Version Tests overview
v6 ✔️
v5
v1 ✔️
v1
v1 ✔️

@Aschen Aschen changed the title Add sleep to wait realtime notifications Add retry in templates to wait realtime notifications Nov 23, 2018
test/templates/realtime.tpl.cpp Outdated Show resolved Hide resolved
test/templates/realtime.tpl.go Show resolved Hide resolved
test/templates/realtime.tpl.java Outdated Show resolved Hide resolved
test/templates/realtime.tpl.js Outdated Show resolved Hide resolved
test/templates/realtime.tpl.go Outdated Show resolved Hide resolved
time.Sleep(4 * time.Second)
os.Exit(0)
}()

b := make([]byte, 4096)
Copy link
Contributor

Choose a reason for hiding this comment

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

You should make sure that the buffer has been completely emptied and printed before stopping the snippet: 4k may not be large enough

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pick this value that should be enough because in the snippets we always print a string with a fixed length

@Aschen Aschen merged commit 60e0423 into master Nov 30, 2018
@Aschen Aschen deleted the fix-realtime-tests branch November 30, 2018 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants