public TransactionTests(SharedFileSystem fileSystem) { var path = fileSystem.CreateNewDirectoryForTest(); _env = new LightningEnvironment(path); _env.Open(); }
public void DatabaseDeleteShouldRemoveAllDuplicateDataItems() { var fs = new SharedFileSystem(); using (var env = new LightningEnvironment(fs.CreateNewDirectoryForTest(), configuration: new EnvironmentConfiguration { MapSize = 1024 * 1024, MaxDatabases = 1 })) { env.Open(); using (var tx = env.BeginTransaction()) using (var db = tx.OpenDatabase(configuration: new DatabaseConfiguration() { Flags = DatabaseOpenFlags.DuplicatesSort })) { var key = "key"; var value1 = "value1"; var value2 = "value2"; tx.Put(db, key, value1); tx.Put(db, key, value2); tx.Delete(db, key); Assert.False(tx.ContainsKey(db, key)); } } }
public MultiProcessTests(SharedFileSystem fileSystem) { var path = fileSystem.CreateNewDirectoryForTest(); _env = new LightningEnvironment(path); _env.Open(); }
public FinalizeTests(SharedFileSystem fileSystem) { var env = new LightningEnvironment(fileSystem.CreateNewDirectoryForTest()); env.Open(); var tx = env.BeginTransaction(); var db = tx.OpenDatabase(); tx.CreateCursor(db); }
public DatabaseIOTests(SharedFileSystem fileSystem) { var path = fileSystem.CreateNewDirectoryForTest(); _env = new LightningEnvironment(path); _env.MaxDatabases = 2; _env.Open(); _txn = _env.BeginTransaction(); _db = _txn.OpenDatabase(configuration: new DatabaseConfiguration { Flags = DatabaseOpenFlags.Create }); }
public EnvironmentTests(SharedFileSystem fileSystem) { _path = fileSystem.CreateNewDirectoryForTest(); _pathCopy = fileSystem.CreateNewDirectoryForTest(); }
public DatabaseTests(SharedFileSystem fileSystem) { var path = fileSystem.CreateNewDirectoryForTest(); _env = new LightningEnvironment(path); }
public ProfilingTests(SharedFileSystem fileSystem) { _env = new LightningEnvironment(fileSystem.CreateNewDirectoryForTest()); _env.MaxDatabases = 2; _env.Open(); }
public MultiProcessTests(SharedFileSystem fileSystem) { _fileSystem = fileSystem; }