Comments (3)
Hi!
Thanks for your interest in the project. First of all let me ask, are the returned values what you expect? I.e. are incr and get returning the correct values, because they should be if not then you may have found a bug which I need to attend to.
Now let me explain the log lines. The log lines are showing what "encoded" responses are being sent back. With incr
an integer is being sent back as shown here with get
a string is being sent back as shown here.
You can see that the encodings for strings and ints are different. This is required by the redis protocol which is defined here. In other words jedis clients expect bulk strings to be prepended with $x
where x
is the number of characters in the string. That's why the string 5
(gets returns strings in the mocks case) has an encoding of $15
. Knowing the returned encoding is useful for me while I dev this tool. Hence the confusing debug line. I will try to make that clearer in the next release.
Does that help?
from jedis-mock.
Hi!
Ok, now it makes perfect sense.
Yes, the values returned are exactly what I expect - so there is no issue there.
I was only confused with the "$1" prepended to the expected value.
Now that you explained the protocol - it looks correct, as the length of the response is indeed "1" character.
Thank you for the explanation - and for maintaining such a valuable project!
Marina
from jedis-mock.
Cool. Glad that explanation made sense. Thanks for the question and for using the project. I am going to close this issue. If you have any other questions/concerns/suggestions please feel to create another issue.
from jedis-mock.
Related Issues (20)
- SET with empty value doesn't work
- Add support for LPOP and RPOP count parameter
- Add CRUD example demonstrating usage of jedis-mock HOT 1
- Support for UNLINK HOT 2
- HSET doesn't work with value longer than 1000 characters HOT 2
- ZRANGEBYSCORE negative count doesn't work HOT 1
- Sets, Zsets and Lists exist even after all elements removed HOT 1
- Blocking operations semantics
- Some operations fail after multiple EXPIREs
- SRANDMEMBER and SPOP with count on non-existent set should return an empty array HOT 1
- Support injected clock HOT 5
- GetDel Operation HOT 2
- Unable to put data into Redis hash with Redisson client
- Error happen: attempt to unlock lock, not locked by current thread by node id: XXX HOT 3
- Request support for smismember HOT 3
- HDEL without fields behaves differently to Redis HOT 2
- Redis Mock sending record in the incorrect order HOT 1
- NOPROTO Resp3 not supported by JedisMock HOT 5
- Support for keyspace notifications HOT 4
- XAdd does not unblock XRead with BLOCK > 0 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jedis-mock.