From fc47cb28f41f9eca8c252b2d36b492ab8d956e6c Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:10:43 +0200 Subject: [PATCH 1/8] Holdings test with 3 suppliers as result --- broker/test/holdings/gvi_directory.json | 120 +++++++++++++++ broker/test/holdings/gvi_sru_response_3.xml | 153 ++++++++++++++++++++ broker/test/holdings/holdings_test.go | 79 +++++++++- broker/test/holdings/request-5.xml | 51 +++++++ 4 files changed, 397 insertions(+), 6 deletions(-) create mode 100644 broker/test/holdings/gvi_sru_response_3.xml create mode 100644 broker/test/holdings/request-5.xml diff --git a/broker/test/holdings/gvi_directory.json b/broker/test/holdings/gvi_directory.json index 9e6c7b40..a81509eb 100644 --- a/broker/test/holdings/gvi_directory.json +++ b/broker/test/holdings/gvi_directory.json @@ -177,5 +177,125 @@ "cost": 0.0 } ] + }, + { + "id": "c04ccfc7-70b2-45fb-a078-51c9cb50a778", + "name": "DE library 89", + "description": "de_89 - has holdings for rec.id = (DE-605)HT016336368)", + "type": "institution", + "symbols": [ + { + "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "symbol": "DE-89", + "authority": "ISIL" + } + ], + "endpoints": [ + { + "id": "59bb2aab-d7e2-4766-9bec-b3ee8877df88", + "entry": "c04ccfc7-70b2-45fb-a078-51c9cb50a778", + "name": "VCGR ISO18626 Service", + "type": "ISO18626", + "address": "http://crosslink-illmock:80/iso18626" + } + ], + "networks": [ + { + "id": "a9491882-b224-5bbe-a950-fe1b956130fc", + "name": "DE", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "priority": 1 + } + ], + "tiers": [ + { + "id": "6bb0026f-8127-528f-bb39-30d8d90e47bd", + "name": "Reciprocal Peer to Peer - Core Loan", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "type": "Loan", + "level": "Core", + "cost": 0.0 + } + ] + }, + { + "id": "c5aa64d8-8485-49f1-a40a-dc70c9f9e49d", + "name": "DE library 468", + "description": "de_468 - has holdings for rec.id = (DE-605)HT016336368)", + "type": "institution", + "symbols": [ + { + "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "symbol": "DE-468", + "authority": "ISIL" + } + ], + "endpoints": [ + { + "id": "59bb2aab-d7e2-4766-9bec-b3ee8877df88", + "entry": "c5aa64d8-8485-49f1-a40a-dc70c9f9e49d", + "name": "VCGR ISO18626 Service", + "type": "ISO18626", + "address": "http://crosslink-illmock:80/iso18626" + } + ], + "networks": [ + { + "id": "a9491882-b224-5bbe-a950-fe1b956130fc", + "name": "DE", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "priority": 1 + } + ], + "tiers": [ + { + "id": "6bb0026f-8127-528f-bb39-30d8d90e47bd", + "name": "Reciprocal Peer to Peer - Core Loan", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "type": "Loan", + "level": "Core", + "cost": 0.0 + } + ] + }, + { + "id": "1269cfb1-369d-4975-8fa9-637cc04388d2", + "name": "DE library Kob7", + "description": "de_Kob7 - has holdings for rec.id = (DE-605)HT016336368)", + "type": "institution", + "symbols": [ + { + "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "symbol": "DE-Kob7", + "authority": "ISIL" + } + ], + "endpoints": [ + { + "id": "59bb2aab-d7e2-4766-9bec-b3ee8877df88", + "entry": "1269cfb1-369d-4975-8fa9-637cc04388d2", + "name": "VCGR ISO18626 Service", + "type": "ISO18626", + "address": "http://crosslink-illmock:80/iso18626" + } + ], + "networks": [ + { + "id": "a9491882-b224-5bbe-a950-fe1b956130fc", + "name": "DE", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "priority": 1 + } + ], + "tiers": [ + { + "id": "6bb0026f-8127-528f-bb39-30d8d90e47bd", + "name": "Reciprocal Peer to Peer - Core Loan", + "consortium": "d5ab4617-d503-588e-802c-df8d25bb411f", + "type": "Loan", + "level": "Core", + "cost": 0.0 + } + ] } ] \ No newline at end of file diff --git a/broker/test/holdings/gvi_sru_response_3.xml b/broker/test/holdings/gvi_sru_response_3.xml new file mode 100644 index 00000000..2a80ea4b --- /dev/null +++ b/broker/test/holdings/gvi_sru_response_3.xml @@ -0,0 +1,153 @@ + + + 1.1 + 1 + + + marcxml + xml + + + 01489nam#a2200421#c#4500 + 990180297100206441 + DE-605 + 20250111171123.0 + tu + 100428|2010####xxu####|######|||#u#eng#c + + 837385275 + OCoLC + + + 015461742 + Uk + + + 9780071628600 + (pbk.) £44.99 + + + 0071628606 + (pbk.) £44.99 + + + (DE-605)HT016336368 + + + (OCoLC)837385275 + + + (DE-599)HBZHT016336368 + + + 468 + ger + DE-605 + Kob 7 + + + eng + + + XD-US + + + DE-468 + + + DE-Kob7 + + + 005.86 + + + h + + + Freeman, Robert G. + aut + Verfasser + + + Oracle RMAN 11g backup and recovery + [maximize the capabilities of Oracle recovery manager ; covers release 2] + Robert G. Freeman ; Matthew Hart + + + Oracle database 11g + + + New York [u.a.] + McGraw-Hill + 2010 + + + XXVII, 656 S. : Ill., graph. Darst. + + + Oracle Press + + + Oracle (Computer file) + + + Relational databases. + + + Data recovery (Computer science) + + + Electronic data processing--Backup processing alternatives. + + + Hart, Matthew + aut + Verfasser + + + V:DE-601;B:DE-89 + application/pdf + https://digitale-objekte.hbz-nrw.de/storage2/2018/07/06/file_194/8065383.pdf + Inhaltsverzeichnis + O:PKN + + + 1174682396 + DE-89 + 89 + GBV + c + T 10 B 6278 + + + 990180297100206441 + DE-468 + NRW + c + + + 990180297100206441 + DE-Kob7 + NRW + c + + + + + 1 + + + + 1.1 + rec.id=(DE-605)HT016336368 + 1 + 1 + xml + marcxml + + + \ No newline at end of file diff --git a/broker/test/holdings/holdings_test.go b/broker/test/holdings/holdings_test.go index 10c86b1a..bcb07b79 100644 --- a/broker/test/holdings/holdings_test.go +++ b/broker/test/holdings/holdings_test.go @@ -34,6 +34,7 @@ var eventRepo events.EventRepo var mockPeerUrl string var shouldFailSruRequest atomic.Bool +var loadResponse3 atomic.Bool // like e2e test but using consortium lookup with zoom and a mock SRU server instead of the real GVI one, so we can simulate different responses/scenarios func TestMain(m *testing.M) { @@ -56,6 +57,9 @@ func TestMain(m *testing.M) { gviSruResponse, err := os.ReadFile("gvi_sru_response.xml") test.Expect(err, "failed to read gvi response file") + gviSruResponse3, err := os.ReadFile("gvi_sru_response_3.xml") + test.Expect(err, "failed to read gvi response file") + sruHandler := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if shouldFailSruRequest.Load() { http.Error(w, "simulated SRU failure", http.StatusInternalServerError) @@ -63,8 +67,14 @@ func TestMain(m *testing.M) { } w.Header().Set("Content-Type", "text/xml") w.WriteHeader(http.StatusOK) - if _, err := w.Write(gviSruResponse); err != nil { - panic(err) + if loadResponse3.Load() { + if _, err := w.Write(gviSruResponse3); err != nil { + panic(err) + } + } else { + if _, err := w.Write(gviSruResponse); err != nil { + panic(err) + } } }) sruServer := httptest.NewServer(sruHandler) @@ -146,6 +156,7 @@ func TestRequestRequesterNotFound(t *testing.T) { func TestRequestRequestSruServerFail(t *testing.T) { shouldFailSruRequest.Store(true) + loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "479931e1-3e94-467c-a04e-272ac8fcc154" data, err := os.ReadFile("request-2.xml") @@ -177,6 +188,7 @@ func TestRequestRequestSruServerFail(t *testing.T) { // should locate the supplier via SRU with scenario UNFILLED in note func TestRequestRequestSruServerUnfilled(t *testing.T) { shouldFailSruRequest.Store(false) + loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "d2ce73de-2545-4ef3-be16-bff17932579a" data, err := os.ReadFile("request-3.xml") @@ -216,6 +228,7 @@ func TestRequestRequestSruServerUnfilled(t *testing.T) { // should locate the supplier via SRU with scenario LOANED in note func TestRequestRequestSruServerLoaned(t *testing.T) { shouldFailSruRequest.Store(false) + loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "1ff51921-4e59-4b31-aec9-c2bc3eaae2d4" data, err := os.ReadFile("request-4.xml") @@ -233,11 +246,11 @@ func TestRequestRequestSruServerLoaned(t *testing.T) { if err != nil { t.Errorf("failed to find ill transaction by requester request id %v", reqId) } - return illTrans.LastSupplierStatus.String == "" && - illTrans.LastRequesterAction.String == "Request" + return illTrans.LastSupplierStatus.String == "LoanCompleted" && + illTrans.LastRequesterAction.String == "ShippedReturn" }) - assert.Equal(t, "", illTrans.LastSupplierStatus.String) - assert.Equal(t, "Request", illTrans.LastRequesterAction.String) + assert.Equal(t, "LoanCompleted", illTrans.LastSupplierStatus.String) + assert.Equal(t, "ShippedReturn", illTrans.LastRequesterAction.String) exp := "NOTICE, request-received = SUCCESS\n" + "TASK, locate-suppliers = SUCCESS\n" + "TASK, select-supplier = SUCCESS\n" + @@ -258,3 +271,57 @@ func TestRequestRequestSruServerLoaned(t *testing.T) { "TASK, confirm-supplier-msg = SUCCESS\n" apptest.EventsCompareString(appCtx, eventRepo, t, illTrans.ID, exp) } + +// should locate the three suppliers via SRU with scenario LOANED in note +func TestRequestRequestSruServerLoanedMultiple(t *testing.T) { + shouldFailSruRequest.Store(false) + loadResponse3.Store(true) + appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) + reqId := "11deaad0-e492-4cc7-9527-6713466cc434" + data, err := os.ReadFile("request-5.xml") + assert.NoError(t, err, "failed to read request file") + req, err := http.NewRequest("POST", mockPeerUrl, bytes.NewReader(data)) + assert.NoError(t, err, "failed to create request") + req.Header.Add("Content-Type", "application/xml") + client := &http.Client{} + res, err := client.Do(req) + assert.NoError(t, err, "failed to send request to mock") + assert.Equal(t, http.StatusOK, res.StatusCode, "handler returned wrong status code") + var illTrans ill_db.IllTransaction + test.WaitForPredicateToBeTrue(func() bool { + illTrans, err = illRepo.GetIllTransactionByRequesterRequestId(appCtx, getPgText(reqId)) + if err != nil { + t.Errorf("failed to find ill transaction by requester request id %v", reqId) + } + return illTrans.LastSupplierStatus.String == "LoanCompleted" && + illTrans.LastRequesterAction.String == "ShippedReturn" + }) + assert.Equal(t, "LoanCompleted", illTrans.LastSupplierStatus.String) + assert.Equal(t, "ShippedReturn", illTrans.LastRequesterAction.String) + exp := "NOTICE, request-received = SUCCESS\n" + + "TASK, locate-suppliers = SUCCESS\n" + + "TASK, select-supplier = SUCCESS\n" + + "TASK, check-availability = SUCCESS\n" + + "TASK, message-requester = SUCCESS\n" + + "TASK, message-supplier = SUCCESS\n" + + "NOTICE, supplier-msg-received = SUCCESS\n" + + "TASK, message-requester = SUCCESS\n" + + "TASK, confirm-supplier-msg = SUCCESS\n" + + "TASK, select-supplier = SUCCESS\n" + + "TASK, check-availability = SUCCESS\n" + + "TASK, message-requester = SUCCESS\n" + + "TASK, message-supplier = SUCCESS\n" + + "NOTICE, supplier-msg-received = SUCCESS\n" + + "TASK, message-requester = SUCCESS\n" + + "TASK, confirm-supplier-msg = SUCCESS\n" + + "NOTICE, requester-msg-received = SUCCESS\n" + + "TASK, message-supplier = SUCCESS\n" + + "TASK, confirm-requester-msg = SUCCESS\n" + + "NOTICE, requester-msg-received = SUCCESS\n" + + "TASK, message-supplier = SUCCESS\n" + + "TASK, confirm-requester-msg = SUCCESS\n" + + "NOTICE, supplier-msg-received = SUCCESS\n" + + "TASK, message-requester = SUCCESS\n" + + "TASK, confirm-supplier-msg = SUCCESS\n" + apptest.EventsCompareString(appCtx, eventRepo, t, illTrans.ID, exp) +} diff --git a/broker/test/holdings/request-5.xml b/broker/test/holdings/request-5.xml new file mode 100644 index 00000000..65ce1c3d --- /dev/null +++ b/broker/test/holdings/request-5.xml @@ -0,0 +1,51 @@ + + +
+ + ISIL + BROKER + + + ISIL + DE-6 + + + 2024-11-28T10:25:11.136Z + 11deaad0-e492-4cc7-9527-6713466cc434 +
+ + (DE-605)HT016336368 + Lord of the Rings + JRR Tolkien + + 1983 + ISBN + + + + 1954 + + + New + PatronRequest + Loan + MOCK:DE-89:LOANED + + + +
+ + The Prancing Pony Inn, Bree + +
+
+ + 123 + +
+
From 89995cb62c7e6c25ba4fd48ed4fb03f46dbde0ad Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:16:24 +0200 Subject: [PATCH 2/8] No right ) after query in description --- broker/test/holdings/gvi_directory.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/broker/test/holdings/gvi_directory.json b/broker/test/holdings/gvi_directory.json index a81509eb..981c10bf 100644 --- a/broker/test/holdings/gvi_directory.json +++ b/broker/test/holdings/gvi_directory.json @@ -181,7 +181,7 @@ { "id": "c04ccfc7-70b2-45fb-a078-51c9cb50a778", "name": "DE library 89", - "description": "de_89 - has holdings for rec.id = (DE-605)HT016336368)", + "description": "de_89 - has holdings for rec.id = (DE-605)HT016336368", "type": "institution", "symbols": [ { @@ -221,7 +221,7 @@ { "id": "c5aa64d8-8485-49f1-a40a-dc70c9f9e49d", "name": "DE library 468", - "description": "de_468 - has holdings for rec.id = (DE-605)HT016336368)", + "description": "de_468 - has holdings for rec.id = (DE-605)HT016336368", "type": "institution", "symbols": [ { @@ -261,7 +261,7 @@ { "id": "1269cfb1-369d-4975-8fa9-637cc04388d2", "name": "DE library Kob7", - "description": "de_Kob7 - has holdings for rec.id = (DE-605)HT016336368)", + "description": "de_Kob7 - has holdings for rec.id = (DE-605)HT016336368", "type": "institution", "symbols": [ { From 3d4fd62f16a92ec862215c1ef7df142b19afecdd Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:17:21 +0200 Subject: [PATCH 3/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- broker/test/holdings/holdings_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/broker/test/holdings/holdings_test.go b/broker/test/holdings/holdings_test.go index bcb07b79..bc88ec03 100644 --- a/broker/test/holdings/holdings_test.go +++ b/broker/test/holdings/holdings_test.go @@ -276,6 +276,9 @@ func TestRequestRequestSruServerLoaned(t *testing.T) { func TestRequestRequestSruServerLoanedMultiple(t *testing.T) { shouldFailSruRequest.Store(false) loadResponse3.Store(true) + t.Cleanup(func() { + loadResponse3.Store(false) + }) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "11deaad0-e492-4cc7-9527-6713466cc434" data, err := os.ReadFile("request-5.xml") From 7957c7634999610f3d478d87a0c36d5a499b42ae Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:19:01 +0200 Subject: [PATCH 4/8] No need to set to false --- broker/test/holdings/holdings_test.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/broker/test/holdings/holdings_test.go b/broker/test/holdings/holdings_test.go index bc88ec03..67257efd 100644 --- a/broker/test/holdings/holdings_test.go +++ b/broker/test/holdings/holdings_test.go @@ -156,7 +156,6 @@ func TestRequestRequesterNotFound(t *testing.T) { func TestRequestRequestSruServerFail(t *testing.T) { shouldFailSruRequest.Store(true) - loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "479931e1-3e94-467c-a04e-272ac8fcc154" data, err := os.ReadFile("request-2.xml") @@ -188,7 +187,6 @@ func TestRequestRequestSruServerFail(t *testing.T) { // should locate the supplier via SRU with scenario UNFILLED in note func TestRequestRequestSruServerUnfilled(t *testing.T) { shouldFailSruRequest.Store(false) - loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "d2ce73de-2545-4ef3-be16-bff17932579a" data, err := os.ReadFile("request-3.xml") @@ -228,7 +226,6 @@ func TestRequestRequestSruServerUnfilled(t *testing.T) { // should locate the supplier via SRU with scenario LOANED in note func TestRequestRequestSruServerLoaned(t *testing.T) { shouldFailSruRequest.Store(false) - loadResponse3.Store(false) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "1ff51921-4e59-4b31-aec9-c2bc3eaae2d4" data, err := os.ReadFile("request-4.xml") From 1c77d8e962cc77c31970f50154df46a348adeb41 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:26:41 +0200 Subject: [PATCH 5/8] All symbol identifieres unique --- broker/test/holdings/gvi_directory.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/broker/test/holdings/gvi_directory.json b/broker/test/holdings/gvi_directory.json index 981c10bf..bf679e75 100644 --- a/broker/test/holdings/gvi_directory.json +++ b/broker/test/holdings/gvi_directory.json @@ -145,7 +145,7 @@ "type": "institution", "symbols": [ { - "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "id": "5fd15452-45b3-470d-86fc-4079991ef790", "symbol": "DE-24", "authority": "ISIL" } @@ -185,7 +185,7 @@ "type": "institution", "symbols": [ { - "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "id": "42322b96-8652-4d6d-a3c9-d93b7db2c7fb", "symbol": "DE-89", "authority": "ISIL" } @@ -225,7 +225,7 @@ "type": "institution", "symbols": [ { - "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "id": "b4f26bc9-d9de-4a07-8f82-7c07d9ef47f2", "symbol": "DE-468", "authority": "ISIL" } @@ -265,7 +265,7 @@ "type": "institution", "symbols": [ { - "id": "1fd24a28-9383-495f-a7df-3dee279627b0", + "id": "f615dfc1-ff98-458f-a115-e7b7f37d20e1", "symbol": "DE-Kob7", "authority": "ISIL" } From 738a70d45f086861d833b02b90a8a0ea470bc254 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:27:31 +0200 Subject: [PATCH 6/8] All symbol identifieres unique 2 --- broker/test/holdings/gvi_directory.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker/test/holdings/gvi_directory.json b/broker/test/holdings/gvi_directory.json index bf679e75..95342c33 100644 --- a/broker/test/holdings/gvi_directory.json +++ b/broker/test/holdings/gvi_directory.json @@ -6,7 +6,7 @@ "type": "institution", "symbols": [ { - "id": "aaa09db9-a001-43cd-a871-1e03afb77b48", + "id": "29cd7861-389a-4c46-ad22-c47988e5be15", "symbol": "GVIC", "authority": "ISIL" } From a81bf54ec2d85ddaaa87e114f2a7db82d8e35d69 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:30:07 +0200 Subject: [PATCH 7/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- broker/test/holdings/holdings_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/broker/test/holdings/holdings_test.go b/broker/test/holdings/holdings_test.go index 67257efd..e2203918 100644 --- a/broker/test/holdings/holdings_test.go +++ b/broker/test/holdings/holdings_test.go @@ -269,7 +269,7 @@ func TestRequestRequestSruServerLoaned(t *testing.T) { apptest.EventsCompareString(appCtx, eventRepo, t, illTrans.ID, exp) } -// should locate the three suppliers via SRU with scenario LOANED in note +// should locate three candidate suppliers via SRU; the second selected supplier fulfills the loan with scenario LOANED in note func TestRequestRequestSruServerLoanedMultiple(t *testing.T) { shouldFailSruRequest.Store(false) loadResponse3.Store(true) From 38c45bbd71e4100686fd6b3ae1ee9362bee44ef5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 18 May 2026 20:42:21 +0200 Subject: [PATCH 8/8] Explicit MOCK directives --- broker/test/holdings/holdings_test.go | 8 ++++---- broker/test/holdings/request-5.xml | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/broker/test/holdings/holdings_test.go b/broker/test/holdings/holdings_test.go index e2203918..3bd3da71 100644 --- a/broker/test/holdings/holdings_test.go +++ b/broker/test/holdings/holdings_test.go @@ -34,7 +34,7 @@ var eventRepo events.EventRepo var mockPeerUrl string var shouldFailSruRequest atomic.Bool -var loadResponse3 atomic.Bool +var useMultiSupplierSruResponse atomic.Bool // like e2e test but using consortium lookup with zoom and a mock SRU server instead of the real GVI one, so we can simulate different responses/scenarios func TestMain(m *testing.M) { @@ -67,7 +67,7 @@ func TestMain(m *testing.M) { } w.Header().Set("Content-Type", "text/xml") w.WriteHeader(http.StatusOK) - if loadResponse3.Load() { + if useMultiSupplierSruResponse.Load() { if _, err := w.Write(gviSruResponse3); err != nil { panic(err) } @@ -272,9 +272,9 @@ func TestRequestRequestSruServerLoaned(t *testing.T) { // should locate three candidate suppliers via SRU; the second selected supplier fulfills the loan with scenario LOANED in note func TestRequestRequestSruServerLoanedMultiple(t *testing.T) { shouldFailSruRequest.Store(false) - loadResponse3.Store(true) + useMultiSupplierSruResponse.Store(true) t.Cleanup(func() { - loadResponse3.Store(false) + useMultiSupplierSruResponse.Store(false) }) appCtx := common.CreateExtCtxWithArgs(context.Background(), nil) reqId := "11deaad0-e492-4cc7-9527-6713466cc434" diff --git a/broker/test/holdings/request-5.xml b/broker/test/holdings/request-5.xml index 65ce1c3d..97ee21c5 100644 --- a/broker/test/holdings/request-5.xml +++ b/broker/test/holdings/request-5.xml @@ -34,7 +34,11 @@ New PatronRequest Loan - MOCK:DE-89:LOANED + + MOCK:DE-24:UNFILLED + MOCK:DE-89:LOANED + MOCK:DE-Kob7:UNFILLED +