Ejemplo n.º 1
0
 public StoreCopyProcess(FileSystemAbstraction fs, PageCache pageCache, LocalDatabase localDatabase, CopiedStoreRecovery copiedStoreRecovery, RemoteStore remoteStore, LogProvider logProvider)
 {
     this._fs                  = fs;
     this._pageCache           = pageCache;
     this._localDatabase       = localDatabase;
     this._copiedStoreRecovery = copiedStoreRecovery;
     this._remoteStore         = remoteStore;
     this._log                 = logProvider.getLog(this.GetType());
 }
Ejemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldThrowIfAlreadyShutdown()
        public virtual void ShouldThrowIfAlreadyShutdown()
        {
            // Given
            CopiedStoreRecovery copiedStoreRecovery = new CopiedStoreRecovery(Config.defaults(), Iterables.empty(), mock(typeof(PageCache)));

            copiedStoreRecovery.Shutdown();

            try
            {
                // when
                copiedStoreRecovery.RecoverCopiedStore(DatabaseLayout.of(new File("nowhere")));
                fail("should have thrown");
            }
            catch (DatabaseShutdownException ex)
            {
                // then
                assertEquals("Abort store-copied store recovery due to database shutdown", ex.Message);
            }
        }