-
Notifications
You must be signed in to change notification settings - Fork 64
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
Implement remaining script API commands #656
Conversation
Note: The test only verifies that the "SCRIPT KILL" command is sent to a live Redis environment by sending a command when no script is running and tests for an "NOTBUSY" error. Currently it does not test for a successfully stopped long-running script.
Hello, you can try to check ideas from previous try of implementation of this commands. May be that can help you |
@@ -179,6 +188,28 @@ trait ScriptingSpec extends BaseSpec { | |||
sha <- scriptLoad(lua).either | |||
} yield assert(sha)(isLeft(isSubtype[ProtocolError](hasField("message", _.message, equalTo(error))))) | |||
} | |||
), | |||
suite("scriptFlush")( | |||
test("return true if loaded scripts are flushed from the cache") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here need check that scripts exists before flush
} yield assertTrue(res == Chunk(false, false)) | ||
} | ||
), | ||
suite("scriptKill")( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no success test(
Thanks for the review, I checked the linked PR and I tried to perform the same test as you did (infinite loop in Lua and test for |
Implemented in #750 |
Addresses remaining items in #158.
Please check if tests for these commands are satisfactory, I could only come up with a basic test for
scriptDebug
, and forscriptKill
I couldn't figure out how to fork a long-running script (e.g., infinite loop) and attempt to kill it.