From 0a6f64703f0e856f2b588176dc7db3be7157e461 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp Date: Wed, 1 Nov 2023 23:45:33 +0100 Subject: [PATCH] Fix failing fetcher tests (#10613) * Fix AstrophysicsDataSystemTest * Disable CCSB tests * Fix path to LICENSE * Fix suffix of LICENSE --- .../logic/importer/fetcher/AstrophysicsDataSystemTest.java | 3 ++- .../CollectionOfComputerScienceBibliographiesFetcherTest.java | 2 ++ src/test/java/org/jabref/logic/net/URLDownloadTest.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java b/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java index e43e11f6821..ad0fb840030 100644 --- a/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java +++ b/src/test/java/org/jabref/logic/importer/fetcher/AstrophysicsDataSystemTest.java @@ -103,6 +103,7 @@ public void setUp() throws Exception { .withField(StandardField.TITLE, "Multiyear On-Orbit Calibration and Performance of Terra MODIS Reflective Solar Bands") .withField(StandardField.VOLUME, "45") .withField(StandardField.YEAR, "2007") + .withField(StandardField.KEYWORDS, "Earth Science") .withField(StandardField.URL, "https://ui.adsabs.harvard.edu/abs/2007ITGRS..45..879X"); ingersollPollardEntry = new BibEntry(StandardEntryType.Article) @@ -125,7 +126,7 @@ public void setUp() throws Exception { .withField(StandardField.AUTHOR, "Lucey, Paul G. and Blewett, David T. and Jolliff, Bradley L.") .withField(StandardField.DOI, "10.1029/1999JE001117") .withField(StandardField.JOURNAL, "\\jgr") - .withField(StandardField.KEYWORDS, "Planetology: Solid Surface Planets: Composition, Planetology: Solid Surface Planets: Remote sensing, Planetology: Solid Surface Planets: Surface materials and properties, Planetology: Solar System Objects: Moon (1221)") + .withField(StandardField.KEYWORDS, "Planetology: Solid Surface Planets: Composition, Planetology: Solid Surface Planets: Remote sensing, Planetology: Solid Surface Planets: Surface materials and properties, Planetology: Solar System Objects: Moon (1221), Earth Science") .withField(StandardField.PAGES, "20297-20306") .withField(StandardField.TITLE, "Lunar iron and titanium abundance algorithms based on final processing of Clementine ultraviolet-visible images") .withField(StandardField.VOLUME, "105") diff --git a/src/test/java/org/jabref/logic/importer/fetcher/CollectionOfComputerScienceBibliographiesFetcherTest.java b/src/test/java/org/jabref/logic/importer/fetcher/CollectionOfComputerScienceBibliographiesFetcherTest.java index 093fe015397..c48e3119642 100644 --- a/src/test/java/org/jabref/logic/importer/fetcher/CollectionOfComputerScienceBibliographiesFetcherTest.java +++ b/src/test/java/org/jabref/logic/importer/fetcher/CollectionOfComputerScienceBibliographiesFetcherTest.java @@ -20,6 +20,7 @@ import org.apache.lucene.queryparser.flexible.core.QueryNodeParseException; import org.apache.lucene.queryparser.flexible.standard.parser.StandardSyntaxParser; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import org.mockito.Answers; @@ -27,6 +28,7 @@ import static org.mockito.Mockito.mock; import static org.mockito.Mockito.when; +@Disabled("https://github.com/JabRef/jabref-issue-melting-pot/issues/259") @FetcherTest class CollectionOfComputerScienceBibliographiesFetcherTest { private CollectionOfComputerScienceBibliographiesFetcher fetcher; diff --git a/src/test/java/org/jabref/logic/net/URLDownloadTest.java b/src/test/java/org/jabref/logic/net/URLDownloadTest.java index 48eb2d20824..858bf839d35 100644 --- a/src/test/java/org/jabref/logic/net/URLDownloadTest.java +++ b/src/test/java/org/jabref/logic/net/URLDownloadTest.java @@ -73,10 +73,10 @@ public void downloadToTemporaryFilePathWithoutFileSavesAsTmpFile() throws IOExce @Test public void downloadToTemporaryFileKeepsName() throws IOException { - URLDownload google = new URLDownload(new URL("https://github.com/JabRef/jabref/blob/main/LICENSE.md")); + URLDownload google = new URLDownload(new URL("https://github.com/JabRef/jabref/blob/main/LICENSE")); String path = google.toTemporaryFile().toString(); - assertTrue(path.contains("LICENSE") && path.endsWith(".md"), path); + assertTrue(path.contains("LICENSE"), path); } @Test