Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
haskell-gargantext
haskell-gargantext
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 187
    • Issues 187
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 10
    • Merge Requests 10
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantexthaskell-gargantext
  • Issues
  • #392

Closed
Open
Opened Sep 02, 2024 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
  • New issue
Report abuse New issue

Hspec `UpdateList` tests are subjects to stall on latest `dev`

I am working on #391 (closed), and I have rebased against dev. After running the tests with:

nix-shell --run "cabal v2-test garg-test-hspec --test-show-details=streaming --test-option=--match='/UpdateList API/'"

I have got them hanging indefinitely right away:

Running 1 test suites...
Test suite garg-test-hspec: RUNNING...

API
  UpdateList API
    setup DB triggers and users [✔]
    POST /api/v1.0/lists/:id/add/form/async (JSON)

Then, after I killed the process with Ctrl^C and restarted them, I got this and another stall:

Running 1 test suites...
Test suite garg-test-hspec: RUNNING...
garg-test-hspec: NNException "nanomsg-haskell error at bind. Errno 48: Address already in use"
garg-test-hspec: NNException "nanomsg-haskell error at bind. Errno 48: Address already in use"

API
  UpdateList API
    setup DB triggers and users [✔]
    POST /api/v1.0/lists/:id/add/form/async (JSON)
[DEBUG] [central_exchange] update tree: nodeId-16
getTableNgrams/setScores #ngrams=1 time=128.00 us
      allows uploading a JSON ngrams file [✔]

I wonder if this is related to #341 (I haven't run git bisect just yet, though). However, it shows that at least resource cleanup is not being executed correctly -- if we kill the test process abruptly, the nanomsg socket remains alive.

Plus, the debug logs really mess up the output of the tests -- we should silence these.

EDIT: Ah, it seems to happen (only?) for the test files I was editing as part of the adinapoli/issue-385-better-testing branch, I wonder if I'm simply missing some initial step to setup websockets and/or I need a different way now to fetch the progress rather than /poll, and that's what's making those tests stall.

@cgenie any insight?

Edited Sep 02, 2024 by Alfredo Di Napoli
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext#392