Search in sources :

Example 11 with RecoveryResult

use of com.quorum.tessera.recovery.RecoveryResult in project tessera by ConsenSys.

the class RecoveryImplTest method testRequestSuccess.

@Test
public void testRequestSuccess() {
    when(transactionRequester.requestAllTransactionsFromLegacyNode(anyString())).thenReturn(true);
    final RecoveryResult result = recovery.request();
    assertThat(result).isEqualTo(RecoveryResult.SUCCESS);
    verify(transactionRequester).requestAllTransactionsFromNode("http://party1/");
    verify(transactionRequester).requestAllTransactionsFromNode("http://party3/");
    verify(transactionRequester).requestAllTransactionsFromLegacyNode("http://party2/");
    verify(transactionRequester).requestAllTransactionsFromLegacyNode("http://party4/");
    verify(discovery).getRemoteNodeInfos();
}
Also used : RecoveryResult(com.quorum.tessera.recovery.RecoveryResult) Test(org.junit.Test)

Aggregations

RecoveryResult (com.quorum.tessera.recovery.RecoveryResult)11 Test (org.junit.Test)10 StagingTransaction (com.quorum.tessera.data.staging.StagingTransaction)4 EncodedPayload (com.quorum.tessera.enclave.EncodedPayload)4 MessageHash (com.quorum.tessera.data.MessageHash)1 PrivacyViolationException (com.quorum.tessera.transaction.exception.PrivacyViolationException)1 PersistenceException (jakarta.persistence.PersistenceException)1