示例#1
0
 public override ResourceIterator <Node> FindNodes(Label label, string key, object value)
 {
     return(_database.findNodes(label, key, value));
 }
示例#2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldRecoverTransactionWherePropertyIsRemovedInTheFuture() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void ShouldRecoverTransactionWherePropertyIsRemovedInTheFuture()
        {
            // GIVEN
            CreateIndex(_label, "key");
            Node node = CreateNodeWithProperty("key", "value");

            CheckPoint();
            AddLabel(node, _label);
            RemoveProperty(node, "key");
            _flush.flush(_db);

            // WHEN
            CrashAndRestart();

            // THEN
            // -- really the problem was that recovery threw exception, so mostly assert that.
            using (Transaction tx = _db.beginTx())
            {
                assertEquals("Updates not propagated correctly during recovery", System.Linq.Enumerable.Empty <Node>(), Iterators.asList(_db.findNodes(_label, "key", "value")));
                tx.Success();
            }
        }