Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
Docs Required, Release Notes Required
Description
Motivation.
Some components depends on MetaStorage API and doesn’t tested well.
In tests, we either have to create "100500" mocks, which doesn’t implement any quasi-real behaviour (e.g. we skip serialization step), or have to implement end-to-end test and start-up real nodes.
See DistributionZoneManagerConfigurationChangesTest
Here, initialization of all the mocks looks longer than the tests themselves.
And we copy-paste this boilerplate code everywhere, when we need a bit more than stupid stub.
Suggestion
Let's
- create standalone version of MetaStorage for test purposes, which will just push raft command directly to a metastorage listener.
- replace boilerplate code in tests with new metastorage implementation.
Attachments
Issue Links
- causes
-
IGNITE-19114 Improve tests code with using StandaloneMetastorageManager.
- Open
- links to