mardi 29 janvier 2019

Is there some way to rollback redis data after finish java test code?

Is there some way to rollback the data in redis after test code run. I worked on a java web project using spring boot 2.

I know redis does not provided rollback operation.

So using another redis (like some embedded redis) in test can ensure test code does not change the redis data. And make a mocked redis client to get data in test redis first and if no data then get from the origin Redis. Does it workable?

And is there a ready made package implements this function?

Or has any simpler way to rollback?

Aucun commentaire:

Enregistrer un commentaire