Skip to content

Commit

Permalink
Increase max records for QA lookups.
Browse files Browse the repository at this point in the history
refs #3761
  • Loading branch information
justinlittman committed Dec 6, 2023
1 parent 4e22ebe commit 4919b38
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion __tests__/Config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe("Config", () => {
})

it("max records for lookups/QA has static value", () => {
expect(Config.maxRecordsForQALookups).toEqual(10)
expect(Config.maxRecordsForQALookups).toEqual(20)
})

describe("interpolated links from default values", () => {
Expand Down
6 changes: 3 additions & 3 deletions __tests__/utilities/QuestioningAuthority.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { findAuthorityConfig } from "utilities/authorityConfig"
describe("createLookupPromise()", () => {
const response = {
ok: true,
url: "https://lookup.ld4l.org/authorities/search/linked_data/agrovoc_ld4l_cache?q=Corn&maxRecords=10&lang=en&context=true&response_header=true&startRecord=1",
url: "https://lookup.ld4l.org/authorities/search/linked_data/agrovoc_ld4l_cache?q=Corn&maxRecords=20&lang=en&context=true&response_header=true&startRecord=1",
status: 200,
statusText: "OK",
json: () => {
Expand Down Expand Up @@ -81,7 +81,7 @@ describe("createLookupPromise()", () => {
const authorityConfig = findAuthorityConfig("urn:ld4p:qa:geonames:water")
await createLookupPromise("Artic Sea", authorityConfig)
expect(global.fetch).toHaveBeenCalledWith(
"https://lookup.ld4l.org/authorities/search/linked_data/geonames_ld4l_cache/water?q=Artic+Sea&maxRecords=10&lang=en&context=true&response_header=true&startRecord=1"
"https://lookup.ld4l.org/authorities/search/linked_data/geonames_ld4l_cache/water?q=Artic+Sea&maxRecords=20&lang=en&context=true&response_header=true&startRecord=1"
)
})
})
Expand All @@ -91,7 +91,7 @@ describe("createLookupPromise()", () => {
const authorityConfig = findAuthorityConfig("urn:discogs:release")
await createLookupPromise("twain", authorityConfig)
expect(global.fetch).toHaveBeenCalledWith(
"https://lookup.ld4l.org/authorities/search/discogs/release?q=twain&maxRecords=10&lang=en&context=true&response_header=true&startRecord=1"
"https://lookup.ld4l.org/authorities/search/discogs/release?q=twain&maxRecords=20&lang=en&context=true&response_header=true&startRecord=1"
)
})
})
Expand Down
2 changes: 1 addition & 1 deletion src/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Config {
}

static get maxRecordsForQALookups() {
return process.env.MAX_RECORDS_FOR_QA_LOOKUPS || 10
return process.env.MAX_RECORDS_FOR_QA_LOOKUPS || 20
}

static get qaUrl() {
Expand Down

0 comments on commit 4919b38

Please sign in to comment.