Open asiaantczak opened 9 months ago
Hello! Thank you for your report. Could you please give me more context:
RedisHashes
class comes from.We're trying to keep JedisMock's behaviour as close to "real Redis" as we can, so of course if can be fixed, we'll fix it.
Hi,
Thank you for such a valuable project. I was looking for a redis mock to use in my unit tests and this one fits perfectly. However what I get from the mock does not completely match what test expects. All the data are correct except the order.
My Redis Mock
My Redis code implementation uses Reactive String Redis Template
My test expects a list of
[[pool-4-thread-1] DEBUG com.github.fppt.jedismock.server.Response - Received command [evalsha] sending reply [*10$15passcode-654321$6654321$15passcode-123456$6123456$10validUntil$202007-12-03T10:15:30Z$8attempts$10$6userId$368a2c1033-a8b3-48c4-8698-7fef9f6ca3de]
Expected :["userId", "8a2c1033-a8b3-48c4-8698-7fef9f6ca3de", "attempts", "0", "validUntil", "2007-12-03T10:15:30Z", "passcode-123456", "123456"] Actual :["passcode-123456", "123456", "validUntil", "2007-12-03T10:15:30Z", "attempts", "0", "userId", "8a2c1033-a8b3-48c4-8698-7fef9f6ca3de"]
The same test works fine with Test Containers.
Is order not guaranteed?
Thank you,