public void Setup() { log = Devices.CreateLogDevice(TestContext.CurrentContext.TestDirectory + "/GenericStringTests.log", deleteOnClose: true); fkv = new FasterKV <int, int>(1L << 20, new LogSettings { LogDevice = log, ObjectLogDevice = null }); session = fkv.For(new Functions()).NewSession <Functions>(); }
public void TearDown() { session.Dispose(); session = null; fkv.Dispose(); fkv = null; log.Dispose(); log = null; }
public FasterKVServerSessionBase(Socket socket, FasterKV <Key, Value> store, Functions functions, SessionVariableLengthStructSettings <Value, Input> sessionVariableLengthStructSettings, ParameterSerializer serializer, MaxSizeSettings maxSizeSettings) : base(socket, maxSizeSettings) { session = store.For(new ServerKVFunctions <Key, Value, Input, Output, Functions>(functions, this)) .NewSession <ServerKVFunctions <Key, Value, Input, Output, Functions> >(sessionVariableLengthStructSettings: sessionVariableLengthStructSettings); this.serializer = serializer; }
public void Setup() { TestUtils.DeleteDirectory(TestUtils.MethodTestDir, wait: true); log = Devices.CreateLogDevice(TestUtils.MethodTestDir + "/GenericStringTests.log", deleteOnClose: true); fkv = new FasterKV <int, int>(1L << 20, new LogSettings { LogDevice = log, ObjectLogDevice = null }); session = fkv.For(new Functions()).NewSession <Functions>(); }
public void TearDown() { session?.Dispose(); session = null; fkv?.Dispose(); fkv = null; log?.Dispose(); log = null; TestUtils.DeleteDirectory(TestUtils.MethodTestDir); }