[go: nahoru, domu]

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

Added the MOVE command to finagle-redis. #267

Closed
wants to merge 4 commits into from
Closed

Added the MOVE command to finagle-redis. #267

wants to merge 4 commits into from

Conversation

penland365
Copy link
Contributor

Finagle-redis does not implement all valid redis commands. Before embarking to flesh out
remaining commands, I want to verify that any commands added are done in the correct
testing and stylistic manner.

The MOVE command has been added as a Key command

Tested with Scala 2.9.2, 2.10.3, 2.11.0
Tested with Redis 2.8

Finagle-redis does not implement all valid redis commands. Before embarking to flesh out
remaining commands, I want to verify that any commands added are done in the correct
testing and stylistic manner.

The MOVE command has been added as a Key command
@@ -65,6 +65,21 @@ trait Keys { self: BaseClient =>
}

/**
* Move key from the currently selected database to the specified destination
Copy link
Contributor

Choose a reason for hiding this comment

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

Only one space after the *

@mosesn
Copy link
Contributor
mosesn commented May 6, 2014

Thanks for the contribution! Could you also add a test to ClientSpec and ClientServerIntegrationSpec?

@mosesn
Copy link
Contributor
mosesn commented May 6, 2014

How did you test with 2.11, by the way? I don't think we've published a good 2.11 yet. Did you do a publish-local on util?

@penland365
Copy link
Contributor Author

Yeah, I didn't test against 2.11.0, my apologies for stating that. When I was in Build.scala I had set this

  crossScalaVersions := Seq("2.9.2", "2.10.0", "2.11.0")

In anticipation of testing 2.11.0 but never got to it. I had it written down in my notes but hadn't gone back to correct it.

The scaladoc formatting for the Redis MOVE command wasn't appropriate, and additional
formatting changes in the method itself were required.

Scaladoc formatting has been fixed along with code style issues.
@penland365
Copy link
Contributor Author

Just notice this while in Build.scala

  testOptions in Test := Seq(Tests.Filter {
      case "com.twitter.finagle.redis.protocol.integration.ClientServerIntegrationSpec" => true //false
      case "com.twitter.finagle.redis.integration.ClientSpec" => true // false
      case "com.twitter.finagle.redis.integration.BtreeClientSpec" => false
      case "com.twitter.finagle.redis.integration.ClientServerIntegrationSpec" => true // false
      case _ => true
    })

That first Spec com.twitter.finagle.redis.protocol.integration.ClientServerIntegrationSpec doesn't appear to exist anymore. Is it OK to yank it? It's not life or death, but did cause me a few minutes of confusion when this

  sbt test-only com.twitter.finagle.redis.protocol.integration.ClientServerIntegrationSpec

was giving me zilch.

@mosesn
Copy link
Contributor
mosesn commented May 6, 2014

I think so, not sure what happened with that.

There was a stale reference to an old Spec inside the finagle-redis portion
of Build.scala.  This was causing confusion when trying to invoke
ClientServerIntegrationSpec, as we had similarly named classes in different
packages.

The stale reference to ClientServerIntegrationSpec has been removed.
Additional testing was requested for the finagle-redis MOVE command impl.
Added tests to the ClientSpec and the ClientServerSpec.
@mosesn
Copy link
Contributor
mosesn commented May 7, 2014

This looks good, let me get another person to take a look too. Also, just a heads-up: if you're going to do a ton of redis commands, it will probably make sense to break it up into a bunch of different PRs so we can review as you go along.

@asrinivas
Copy link

lgtm!

@mosesn
Copy link
Contributor
mosesn commented May 10, 2014

This has been merged internally, it should show up in the github repo sometime next week. Thanks for the contribution!

@mosesn
Copy link
Contributor
mosesn commented May 16, 2014

It's on github!

@mosesn mosesn closed this May 16, 2014
@penland365 penland365 deleted the redis_move_command branch May 16, 2014 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants