Skip to content

Commit 00ea316

Browse files
authored
Merge pull request #5715 from JabRef/fixspringer
fix springer fetcher tests
2 parents 66c82d7 + 6af53de commit 00ea316

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/main/java/org/jabref/logic/importer/fetcher/SpringerFetcher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class SpringerFetcher implements SearchBasedParserFetcher {
3838
private static final Logger LOGGER = LoggerFactory.getLogger(SpringerFetcher.class);
3939

4040
private static final String API_URL = "http://api.springernature.com/meta/v1/json?q=";
41-
private static final String API_KEY = "b0c7151179b3d9c1119cf325bca8460d";
41+
private static final String API_KEY = "a98b4a55181ffcd27259bea45edad12e";
4242

4343
/**
4444
* Convert a JSONObject obtained from http://api.springer.com/metadata/json to a BibEntry

src/test/java/org/jabref/logic/importer/fetcher/SpringerFetcherTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.jabref.model.entry.BibEntry;
88
import org.jabref.model.entry.field.StandardField;
99
import org.jabref.model.entry.types.StandardEntryType;
10+
import org.jabref.support.DisabledOnCIServer;
1011
import org.jabref.testutils.category.FetcherTest;
1112

1213
import kong.unirest.json.JSONObject;
@@ -25,6 +26,7 @@ void setUp() {
2526
fetcher = new SpringerFetcher();
2627
}
2728

29+
@DisabledOnCIServer("Disable on CI Server to not hit the API call limit")
2830
@Test
2931
void searchByQueryFindsEntry() throws Exception {
3032
BibEntry expected = new BibEntry(StandardEntryType.Article);
@@ -47,6 +49,7 @@ void searchByQueryFindsEntry() throws Exception {
4749
assertEquals(Collections.singletonList(expected), fetchedEntries);
4850
}
4951

52+
@DisabledOnCIServer("Disable on CI Server to not hit the API call limit")
5053
@Test
5154
void testSpringerJSONToBibtex() {
5255
String jsonString = "{\r\n" + " \"identifier\":\"doi:10.1007/BF01201962\",\r\n"
@@ -70,6 +73,7 @@ void testSpringerJSONToBibtex() {
7073
assertEquals(Optional.of("1992-09-01"), bibEntry.getField(StandardField.DATE));
7174
}
7275

76+
@DisabledOnCIServer("Disable on CI Server to not hit the API call limit")
7377
@Test
7478
void searchByEmptyQueryFindsNothing() throws Exception {
7579
assertEquals(Collections.emptyList(), fetcher.performSearch(""));

0 commit comments

Comments
 (0)