ChenSammi commented on code in PR #3346:
URL: https://github.com/apache/ozone/pull/3346#discussion_r864479383
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/keyvalue/impl/TestBlockManagerImpl.java:
##########
@@ -73,23 +76,28 @@ public class TestBlockManagerImpl {
private BlockID blockID1;
private final ContainerLayoutVersion layout;
+ private final String schemaVersion;
- public TestBlockManagerImpl(ContainerLayoutVersion layout) {
- this.layout = layout;
+ public TestBlockManagerImpl(ContainerTestVersionInfo versionInfo) {
+ this.layout = versionInfo.getLayout();
+ this.schemaVersion = versionInfo.getSchemaVersion();
+ this.config = new OzoneConfiguration();
+ ContainerTestVersionInfo.setTestSchemaVersion(schemaVersion, config);
}
@Parameterized.Parameters
public static Iterable<Object[]> parameters() {
- return ContainerLayoutTestInfo.containerLayoutParameters();
+ return ContainerTestVersionInfo.versionParameters();
}
@Before
public void setUp() throws Exception {
- config = new OzoneConfiguration();
UUID datanodeId = UUID.randomUUID();
HddsVolume hddsVolume = new HddsVolume.Builder(folder.getRoot()
.getAbsolutePath()).conf(config).datanodeUuid(datanodeId
.toString()).build();
+ StorageVolumeUtil.checkVolume(hddsVolume, scmId, scmId, config,
+ null, null);
Review Comment:
Shall we call createDbInstancesForTestIfNeeded instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]