Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

Added MySQL SLEEP function #649

Merged
merged 4 commits into from
Apr 11, 2019
Merged

Added MySQL SLEEP function #649

merged 4 commits into from
Apr 11, 2019

Conversation

juanjux
Copy link
Contributor

@juanjux juanjux commented Apr 2, 2019

Adds MySQL SLEEP function, that seems to be useful for some kinds of testing.

Fixes #647.

Signed-off-by: Juanjo Alvarez juanjo@sourced.tech

@juanjux juanjux added the feature label Apr 2, 2019
@juanjux juanjux self-assigned this Apr 2, 2019
}

if child.(int32) > 0 {
time.Sleep(time.Duration(child.(int32)) * time.Second)
Copy link
Contributor

Choose a reason for hiding this comment

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

Based on mysql docs a fraction can be used, so my understanding is that someone can write sleep(0.5) to sleep for 500 ms. So, I think it's better to make it a float function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

True! I'll fix it in the next push.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed and pushed, PTAL when you can.

@kuba--
Copy link
Contributor

kuba-- commented Apr 3, 2019

go mod tidy

or rebuild:

/home/travis/gopath/pkg/mod/cache/vcs/55179c5d8c4db2eaed9fae4682d4c84a1fd3612df666b372bef3bbb997c9601f: exit status 128:
	fatal: unable to access 'https://go.googlesource.com/sync/': The requested URL returned error: 502
go: golang.org/x/sync@v0.0.0-20180314180146-1d60e4601c6f: unknown revision 1d60e4601c6f
go: error loading module requirements

@erizocosmico
Copy link
Contributor

@juanjux why is there a "foo" commit in the history? Leftover? :P

@juanjux
Copy link
Contributor Author

juanjux commented Apr 10, 2019

@erizocosmico 🤦‍♂️ yes, I call foo the commits I do with the intention of rebasing so I don't forget to do it. Clearly it didn't work this time.

Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

@juanjux could you add the new Function to README and SUPPORTED md files?

@juanjux
Copy link
Contributor Author

juanjux commented Apr 10, 2019

@ajnavarro done!

Juanjo Alvarez added 2 commits April 11, 2019 11:02
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
@juanjux
Copy link
Contributor Author

juanjux commented Apr 11, 2019

PR rebased to the new `master.

@ajnavarro
Copy link
Contributor

@juanjux Check PR content, should we remove base64 Functions from this PR?

Juanjo Alvarez added 2 commits April 11, 2019 11:17
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>

Add also test in engine_test.go

Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>

Remove base64 stuff

Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
@juanjux
Copy link
Contributor Author

juanjux commented Apr 11, 2019

@ajnavarro done.

@ajnavarro ajnavarro merged commit 87f17d6 into src-d:master Apr 11, 2019
@juanjux juanjux deleted the sql-sleep branch April 11, 2019 09:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants