Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fail on testPerformExportForSingleEntry from DocBook5ExporterTest #5168

Merged
merged 2 commits into from
Aug 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void export(final BibDatabaseContext databaseContext, final Path file,
if (layouts.containsKey(type)) {
layout = layouts.get(type);
} else {
try (Reader reader = getReader(lfFileName + '.' + type + LAYOUT_EXTENSION)) {
try (Reader reader = getReader(lfFileName + '.' + type.getName() + LAYOUT_EXTENSION)) {
// We try to get a type-specific layout for this entry.
layoutHelper = new LayoutHelper(reader, layoutPreferences);
layout = layoutHelper.getLayoutFromText();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import org.jabref.model.entry.BibEntry;
import org.jabref.model.entry.StandardEntryType;
import org.jabref.model.entry.field.StandardField;
import org.jabref.support.DisabledOnCIServer;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -67,7 +66,6 @@ void setUp() throws URISyntaxException {
}

@Test
@DisabledOnCIServer("Fails on CI for some reason")
void testPerformExportForSingleEntry(@TempDir Path testFolder) throws Exception {
Path path = testFolder.resolve("ThisIsARandomlyNamedFile");

Expand All @@ -77,6 +75,7 @@ void testPerformExportForSingleEntry(@TempDir Path testFolder) throws Exception
Builder test = Input.from(Files.newInputStream(path));

assertThat(test, CompareMatcher.isSimilarTo(control)
.normalizeWhitespace()
.withNodeMatcher(new DefaultNodeMatcher(ElementSelectors.byNameAndText)).throwComparisonFailure());
}
}