Skip to content

Commit

Permalink
HDDS-10431. Fix test testLeaseSoftLimitForHsyncRecoverFile failure …
Browse files Browse the repository at this point in the history
…by setting mod time properly
  • Loading branch information
smengcl committed Mar 6, 2024
1 parent 1d81c32 commit 25f42bc
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.OMResponse;
import org.apache.hadoop.ozone.protocol.proto.OzoneManagerProtocolProtos.AllocateBlockRequest;
import jakarta.annotation.Nonnull;
import org.apache.hadoop.util.Time;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
Expand Down Expand Up @@ -565,6 +566,7 @@ String addToOpenFileTable(List<OmKeyLocationInfo> locationList, boolean hsyncFla
OmKeyInfo omKeyInfo = OMRequestTestUtils.createOmKeyInfo(volumeName,
bucketName, keyName, replicationConfig, new OmKeyLocationInfoGroup(version, new ArrayList<>(), false))
.setParentObjectID(parentId)
.setModificationTime(Time.now())
.build();
omKeyInfo.appendNewBlocks(locationList, false);
if (hsyncFlag) {
Expand All @@ -590,6 +592,7 @@ String addToFileTable(List<OmKeyLocationInfo> locationList, boolean hsyncFlag)
OmKeyInfo omKeyInfo = OMRequestTestUtils.createOmKeyInfo(volumeName,
bucketName, keyName, replicationConfig, new OmKeyLocationInfoGroup(version, new ArrayList<>(), false))
.setParentObjectID(parentId)
.setModificationTime(Time.now())
.build();
omKeyInfo.appendNewBlocks(locationList, false);
if (hsyncFlag) {
Expand Down

0 comments on commit 25f42bc

Please sign in to comment.