コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void updatePullerTriggerPageTransactionTracking()
		 public virtual void UpdatePullerTriggerPageTransactionTracking()
		 {
			  HighlyAvailableGraphDatabase slave = _cluster.AnySlave;
			  TransactionIdStore slaveTransactionIdStore = slave.DependencyResolver.resolveDependency( typeof( TransactionIdStore ) );
			  assertEquals( 5, slaveTransactionIdStore.LastClosedTransactionId );

			  ByzantineLongSupplier byzantineIdSupplier = _contextSupplier.ByzantineIdSupplier;
			  byzantineIdSupplier.UseWrongTxId();
			  try
			  {
					  using ( Transaction ignored = slave.BeginTx() )
					  {
						slave.Execute( "match (n) return n" );
					  }
			  }
			  catch ( QueryExecutionException executionException )
			  {
					assertEquals( "Unable to get clean data snapshot for query 'match (n) return n' after 5 attempts.", executionException.Message );
			  }
			  byzantineIdSupplier.UseCorrectTxId();
			  slave.Execute( "match (n) return n" ).close();
		 }