Fixed warnings in IDE, applied clang-format.
This commit is contained in:
parent
494acf7a54
commit
256e9ba487
|
@ -163,7 +163,6 @@ public:
|
|||
state Version maxVer = 0;
|
||||
state RangeFile rf;
|
||||
state json_spirit::mArray fileArray;
|
||||
state int i;
|
||||
|
||||
// Validate each filename, update version range
|
||||
for (const auto& f : fileNames) {
|
||||
|
@ -1488,7 +1487,7 @@ void BackupContainerFileSystem::setEncryptionKey(Optional<std::string> const& en
|
|||
#endif
|
||||
}
|
||||
}
|
||||
Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string const &filename) {
|
||||
Future<Void> BackupContainerFileSystem::createTestEncryptionKeyFile(std::string const& filename) {
|
||||
#if ENCRYPTION_ENABLED
|
||||
return BackupContainerFileSystemImpl::createTestEncryptionKeyFile(filename);
|
||||
#else
|
||||
|
@ -1507,13 +1506,16 @@ int chooseFileSize(std::vector<int>& sizes) {
|
|||
return deterministicRandom()->randomInt(0, 2e6);
|
||||
}
|
||||
|
||||
ACTOR Future<Void> writeAndVerifyFile(Reference<IBackupContainer> c, Reference<IBackupFile> f, int size, FlowLock* lock) {
|
||||
ACTOR Future<Void> writeAndVerifyFile(Reference<IBackupContainer> c,
|
||||
Reference<IBackupFile> f,
|
||||
int size,
|
||||
FlowLock* lock) {
|
||||
state Standalone<VectorRef<uint8_t>> content;
|
||||
|
||||
wait(lock->take(TaskPriority::DefaultYield, size));
|
||||
state FlowLock::Releaser releaser(*lock, size);
|
||||
state FlowLock::Releaser releaser(*lock, size);
|
||||
|
||||
printf("writeAndVerify size=%d file=%s\n", size, f->getFileName().c_str());
|
||||
printf("writeAndVerify size=%d file=%s\n", size, f->getFileName().c_str());
|
||||
content.resize(content.arena(), size);
|
||||
for (int i = 0; i < content.size(); ++i) {
|
||||
content[i] = (uint8_t)deterministicRandom()->randomInt(0, 256);
|
||||
|
@ -1601,9 +1603,9 @@ ACTOR Future<Void> testBackupContainer(std::string url, Optional<std::string> en
|
|||
// List of sizes to use to test edge cases on underlying file implementations
|
||||
state std::vector<int> fileSizes = { 0 };
|
||||
if (StringRef(url).startsWith(LiteralStringRef("blob"))) {
|
||||
fileSizes.push_back(CLIENT_KNOBS->BLOBSTORE_MULTIPART_MIN_PART_SIZE);
|
||||
fileSizes.push_back(CLIENT_KNOBS->BLOBSTORE_MULTIPART_MIN_PART_SIZE + 10);
|
||||
}
|
||||
fileSizes.push_back(CLIENT_KNOBS->BLOBSTORE_MULTIPART_MIN_PART_SIZE);
|
||||
fileSizes.push_back(CLIENT_KNOBS->BLOBSTORE_MULTIPART_MIN_PART_SIZE + 10);
|
||||
}
|
||||
|
||||
loop {
|
||||
state Version logStart = v;
|
||||
|
|
|
@ -262,6 +262,7 @@ TEST_CASE("fdbrpc/AsyncFileEncrypted") {
|
|||
state Reference<IAsyncFile> file =
|
||||
wait(IAsyncFileSystem::filesystem()->open(joinPath(params.getDataDir(), "test-encrypted-file"), flags, 0600));
|
||||
state int bytesWritten = 0;
|
||||
state int chunkSize;
|
||||
while (bytesWritten < bytes) {
|
||||
chunkSize = std::min(deterministicRandom()->randomInt(0, 100), bytes - bytesWritten);
|
||||
wait(file->write(&writeBuffer[bytesWritten], chunkSize, bytesWritten));
|
||||
|
@ -269,7 +270,6 @@ TEST_CASE("fdbrpc/AsyncFileEncrypted") {
|
|||
}
|
||||
wait(file->sync());
|
||||
state int bytesRead = 0;
|
||||
state int chunkSize;
|
||||
while (bytesRead < bytes) {
|
||||
chunkSize = std::min(deterministicRandom()->randomInt(0, 100), bytes - bytesRead);
|
||||
int bytesReadInChunk = wait(file->read(&readBuffer[bytesRead], chunkSize, bytesRead));
|
||||
|
|
Loading…
Reference in New Issue