From c6110793624c7184c4da3c717c9bd404328a9a85 Mon Sep 17 00:00:00 2001 From: Anton Persson Date: Wed, 14 Mar 2018 14:48:19 +0100 Subject: [PATCH] Fix test expecting wrong exception --- .../neo4j/index/internal/gbptree/GBPTreeTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/community/index/src/test/java/org/neo4j/index/internal/gbptree/GBPTreeTest.java b/community/index/src/test/java/org/neo4j/index/internal/gbptree/GBPTreeTest.java index ee2a0bb21ab59..51a9fec315387 100644 --- a/community/index/src/test/java/org/neo4j/index/internal/gbptree/GBPTreeTest.java +++ b/community/index/src/test/java/org/neo4j/index/internal/gbptree/GBPTreeTest.java @@ -664,18 +664,18 @@ public void readHeaderMustThrowIfFileDoesNotExist() throws Exception } @Test - public void openWithReadHeaderMustThrowIOExceptionIfFileIsEmpty() throws Exception + public void openWithReadHeaderMustThrowMetadataMismatchExceptionIfFileIsEmpty() throws Exception { - openMustThrowIOExceptionIfFileIsEmpty( pageCache -> GBPTree.readHeader( pageCache, indexFile, layout, NO_HEADER_READER ) ); + openMustThrowMetadataMismatchExceptionIfFileIsEmpty( pageCache -> GBPTree.readHeader( pageCache, indexFile, layout, NO_HEADER_READER ) ); } @Test - public void openWithConstructorMustThrowIOExceptionIfFileIsEmpty() throws Exception + public void openWithConstructorMustThrowMetadataMismatchExceptionIfFileIsEmpty() throws Exception { - openMustThrowIOExceptionIfFileIsEmpty( pageCache -> index( pageCache ).build() ); + openMustThrowMetadataMismatchExceptionIfFileIsEmpty( pageCache -> index( pageCache ).build() ); } - private void openMustThrowIOExceptionIfFileIsEmpty( ThrowingConsumer opener ) throws Exception + private void openMustThrowMetadataMismatchExceptionIfFileIsEmpty( ThrowingConsumer opener ) throws Exception { // given an existing empty file PageCache pageCache = createPageCache( DEFAULT_PAGE_SIZE ); @@ -687,7 +687,7 @@ private void openMustThrowIOExceptionIfFileIsEmpty( ThrowingConsumer