Uploaded image for project: 'mod-circulation'
  1. mod-circulation
  2. CIRC-773

Cannot manually expire patron sessions via API

    XMLWordPrintable

Details

    • EPAM-Veg Sprint 103
    • 0
    • Vega

    Description

      Background:
      We observed that patron action sessions are not being expired although a timer to end patron sessions runs every 3 minutes. Associated JIRA - https://issues.folio.org/browse/CIRC-726

      We decided to run a script that expires patron action sessions older than an hour.

      For Example:
      Get all patron action sessions older than an hour by hitting https://<okapi-url>/patron-action-session-storage/patron-action-sessions?query=(metadata.createdDate%3c2020-06-11T01:39:54.218+0000)

      POST https://<okapi-url>/circulation/end-patron-action-session with list of "endSessions" constructed from above.
      Example request body:
      {
      "endSessions": [

      { "patronId": "*****", "actionType": "Check-out" }

      ,

      { "patronId": "*****", "actionType": "Check-in" }

      ,
      ..........<shortened for brevity>
      ],
      "totalRecords": 31
      }

      We get a 204 from the POST request and expectation is that active sessions associated with the patron id and action type in request body will be ended

      Actual Result:
      When we make a GET request again, we see the same number of active patron sessions suggesting that they are not expired. Checking the DB also gives the same results.
      Note: When we repeatedly make the same request, sometimes we see 1 or 2 patron sessions being expired and reduction in count(but its like making multiple POST requests with same request body).

      Attached are the associated logs from mod-circulation-storage.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                OleksandrVidinieiev Oleksandr Vidinieiev
                sduvvuri Sobha Duvvuri
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  TestRail: Runs

                    TestRail: Cases