Search in sources :

Example 11 with StreamFile

use of com.hedera.mirror.common.domain.StreamFile in project hedera-mirror-node by hashgraph.

the class AbstractStreamFileParserTest method alreadyExists.

@Test
void alreadyExists() {
    // given
    StreamFile streamFile = getStreamFile();
    when(streamFileRepository.existsById(streamFile.getConsensusEnd())).thenReturn(true);
    // when
    parser.parse(streamFile);
    // then
    assertParsed(streamFile, false, false);
    assertPostParseStreamFile(streamFile, true);
}
Also used : StreamFile(com.hedera.mirror.common.domain.StreamFile) Test(org.junit.jupiter.api.Test)

Aggregations

StreamFile (com.hedera.mirror.common.domain.StreamFile)11 Test (org.junit.jupiter.api.Test)5 StreamType (com.hedera.mirror.common.domain.StreamType)4 Instant (java.time.Instant)4 DomainUtils (com.hedera.mirror.common.util.DomainUtils)3 MirrorProperties (com.hedera.mirror.importer.MirrorProperties)3 StreamFilename (com.hedera.mirror.importer.domain.StreamFilename)3 DATA (com.hedera.mirror.importer.domain.StreamFilename.FileType.DATA)3 Duration (java.time.Duration)3 List (java.util.List)3 Optional (java.util.Optional)3 Log4j2 (lombok.extern.log4j.Log4j2)3 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)3 ReflectUtils (org.springframework.cglib.core.ReflectUtils)3 DownloaderProperties (com.hedera.mirror.importer.downloader.DownloaderProperties)2 InvalidConfigurationException (com.hedera.mirror.importer.exception.InvalidConfigurationException)2 AccountBalanceFileRepository (com.hedera.mirror.importer.repository.AccountBalanceFileRepository)2 EventFileRepository (com.hedera.mirror.importer.repository.EventFileRepository)2 RecordFileRepository (com.hedera.mirror.importer.repository.RecordFileRepository)2 StreamFileRepository (com.hedera.mirror.importer.repository.StreamFileRepository)2