use of tech.pegasys.teku.storage.server.StateStorageMode in project teku by ConsenSys.
the class StorageSystemArgumentsProvider method provideArguments.
@Override
public Stream<? extends Arguments> provideArguments(ExtensionContext context) {
final Map<String, StorageSystemSupplier> storageSystems = new HashMap<>();
for (StateStorageMode mode : StateStorageMode.values()) {
for (Long storageFrequency : stateStorageFrequencyOptions) {
for (DatabaseVersion databaseVersion : supportedDatabaseVersions()) {
storageSystems.put(describeStorage(databaseVersion.name() + " (in-memory)", storageFrequency), (dataPath, spec) -> InMemoryStorageSystemBuilder.create().specProvider(spec).version(databaseVersion).storageMode(mode).stateStorageFrequency(storageFrequency).build());
storageSystems.put(describeStorage(databaseVersion.name() + " (file-backed)", storageFrequency), (dataPath, spec) -> FileBackedStorageSystemBuilder.create().specProvider(spec).version(databaseVersion).dataDir(dataPath).storageMode(mode).stateStorageFrequency(storageFrequency).build());
}
}
}
return storageSystems.entrySet().stream().map((entry) -> Arguments.of("storage type: " + entry.getKey(), entry.getValue()));
}
Aggregations