Skip to content

Commit

Permalink
Reduce LocalMemoryDevice size for CI tests (#764)
Browse files Browse the repository at this point in the history
  • Loading branch information
badrishc authored Nov 14, 2022
1 parent b6700cc commit e85283b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cs/test/FasterLogFastCommitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void FasterLogSimpleFastCommitTest([Values] TestUtils.DeviceType deviceTy

var filename = path + "fastCommit" + deviceType.ToString() + ".log";
device = TestUtils.CreateTestDevice(deviceType, filename, deleteOnClose: true);
var logSettings = new FasterLogSettings { LogDevice = device, LogChecksum = LogChecksumType.PerEntry, LogCommitManager = manager, FastCommitMode = true, TryRecoverLatest = false};
var logSettings = new FasterLogSettings { LogDevice = device, LogChecksum = LogChecksumType.PerEntry, LogCommitManager = manager, FastCommitMode = true, TryRecoverLatest = false, SegmentSizeBits = 26};
log = new FasterLog(logSettings);

byte[] entry = new byte[entryLength];
Expand Down Expand Up @@ -103,7 +103,7 @@ public void CommitRecordBoundedGrowthTest([Values] TestUtils.DeviceType deviceTy

var filename = path + "boundedGrowth" + deviceType.ToString() + ".log";
device = TestUtils.CreateTestDevice(deviceType, filename, deleteOnClose: true);
var logSettings = new FasterLogSettings { LogDevice = device, LogChecksum = LogChecksumType.PerEntry, LogCommitManager = manager, FastCommitMode = true};
var logSettings = new FasterLogSettings { LogDevice = device, LogChecksum = LogChecksumType.PerEntry, LogCommitManager = manager, FastCommitMode = true, SegmentSizeBits = 26 };
log = new FasterLog(logSettings);

byte[] entry = new byte[entryLength];
Expand Down
2 changes: 1 addition & 1 deletion cs/test/FasterLogTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public void TestDisposeReleasesFileLocksWithCompletedCommit([Values] TestUtils.D
internal class FasterLogTestBase
{
protected const int entryLength = 100;
protected const int numEntries = 100000; //1000000;
protected const int numEntries = 10000; //1000000;
protected const int numSpanEntries = 500; // really slows down if go too many
protected FasterLog log;
protected IDevice device;
Expand Down
4 changes: 2 additions & 2 deletions cs/test/LowMemAsyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public void Setup()
{
path = TestUtils.MethodTestDir;
TestUtils.DeleteDirectory(path, wait: true);
log = new LocalMemoryDevice(1L << 30, 1L << 25, 1, latencyMs: 20, fileName: path + "/test.log");
log = new LocalMemoryDevice(1L << 28, 1L << 25, 1, latencyMs: 20, fileName: path + "/test.log");
Directory.CreateDirectory(path);
fht1 = new FasterKV<long, long>
(1L << 10,
logSettings: new LogSettings { LogDevice = log, MutableFraction = 1, PageSizeBits = 10, MemorySizeBits = 12 },
logSettings: new LogSettings { LogDevice = log, MutableFraction = 1, PageSizeBits = 10, MemorySizeBits = 12, SegmentSizeBits = 26 },
checkpointSettings: new CheckpointSettings { CheckpointDir = path }
);
}
Expand Down
2 changes: 1 addition & 1 deletion cs/test/TestUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public enum DeviceType
break;
// Emulated higher latency storage device - takes a disk latency arg (latencyMs) and emulates an IDevice using main memory, serving data at specified latency
case DeviceType.LocalMemory:
device = new LocalMemoryDevice(1L << 30, 1L << 30, 2, sector_size: 512, latencyMs: latencyMs, fileName: filename); // 64 MB (1L << 26) is enough for our test cases
device = new LocalMemoryDevice(1L << 28, 1L << 25, 2, sector_size: 512, latencyMs: latencyMs, fileName: filename); // 64 MB (1L << 26) is enough for our test cases
break;
}

Expand Down

0 comments on commit e85283b

Please sign in to comment.