-
Notifications
You must be signed in to change notification settings - Fork 5
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
Enable state persistence through simple file store #112
Comments
Ahh, it seems that |
Currently, Wiremock does not provide a way to pass configuration options to extensions. While stores are configurable, I’m not aware of a way provide them in an extension-like mechanism. And I don’t think making persistence a default would be ok. |
Hi Dirk, thanks for responding. That's a good suggestion that I might just look into! Agree on making persistence as a default would violate the need for interim mocking. While I've tried to implement the persistence layer via Sqlite, it seems that it would be hard to find a way to contribute this feature directly to this repo unless there's admin interface built-in and state-extension is able to be configured directly via the interface 🤔 For reference of the above feature in case there are people looking for the idea of how to override the store quickly 👍🏻 |
A small update. I talked with the core wiremock team on both configuration and store options. Long term, the store system of WireMock will be configurable, e.g. by adding custom stores. This will be the way to go for establishing this feature in the end. As intermediate solution, I'm thinking about adding some configuration options. These options will be phased out as soon as the store system is available though. The feature design for extension-specific configuration options is covered in issue wiremock/wiremock#2579 . |
A small update. I talked with the core wiremock team on both configuration and store options. Long term, the store system of WireMock will be configurable, e.g. by adding custom stores. So any persistence will be covered by that mechanism. |
Proposal
Current implementation of State Extension works very well. However, there will be times when there's a need to persist state through restarts (For example, when upgrading WireMock version).
To tackle this, it would be great to save Caffeine's state separately to a file while running and reading them back after waking up.
References
https://stackoverflow.com/questions/71566146/cache-data-to-local-hdd-with-caffeine#comment126486444_71566146
The text was updated successfully, but these errors were encountered: