chipsenkbeil / org-roam.nvim

Port of org-roam to neovim using orgmode
MIT License
125 stars 11 forks source link

[bug] Flaky tests #16

Closed chipsenkbeil closed 6 months ago

chipsenkbeil commented 7 months ago

It happens every so often where a test fails like this:

Fail    ||  org-roam.database should support loading a modified file when loading the directory containing it   
            .../work/org-roam.nvim/org-roam.nvim/spec/database_spec.lua:113: Expected objects to be the same.
            Passed in:
            (table: 0x7f6e9c6e80[70](https://github.com/chipsenkbeil/org-roam.nvim/actions/runs/8649324800/job/23715290779#step:4:71)) {
              [2] = 1 }
            Expected:
            (table: 0x7f6e9bf103b0) {
              [2] = 1
             *[3] = 1 }

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/database_spec.lua:113: in function <.../work/org-roam.nvim/org-roam.nvim/spec/database_spec.lua:98>

Example run: https://github.com/chipsenkbeil/org-roam.nvim/actions/runs/8649324800/job/23715290779

chipsenkbeil commented 7 months ago

More examples that may be applicable

Fail    ||  org-roam.api.node should create a new node and navigate to it if find with non-existing node    
            .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:324: Expected objects to be the same.
            Passed in:
            (table: 0x7fbeb5de2298) {
              [1] = ':PROPERTIES:'
             *[2] = ':ID: 1'
              [3] = ':ROAM_ALIASES: one'
              [4] = ':END:'
              [5] = '#+FILETAGS: :one:'
              [6] = ''
              [7] = '[[id:2]]' }
            Expected:
            (table: 0x7fbeb5de2208) {
              [1] = ':PROPERTIES:'
             *[2] = ':ID: 4988b77d-44c5-4f-81ae-7600e4f1e327'
              [3] = ':ROAM_ORIGIN: 1'
              [4] = ':END:'
              [5] = '#+TITLE: some custom node'
              [6] = ''
              [7] = '' }

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:324: in function <.../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:290>
Fail    ||  org-roam.api.node should capture by using the selected roam template    
            .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:66: missing node 6487b12f-4297-4468-b461-8b0fda46619e

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:66: in function <.../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:36>

Example run: https://github.com/chipsenkbeil/org-roam.nvim/actions/runs/8779467322/job/24087568006

chipsenkbeil commented 7 months ago
Fail    ||  org-roam.api.node should capture by using the selected roam template    
            .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:54: missing node 06b93801-49ef-454a-a2dd-2eb7c3d4b49e

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:54: in function <.../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:24>
Fail    ||  org-roam.api.node should create a new node and insert it if selected non-existing node  
            .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:189: Expected objects to be the same.
            Passed in:
            (table: 0x7f87d5e76580) {
              [1] = ':PROPERTIES:'
              [2] = ':ID: 1'
              [3] = ':ROAM_ALIASES: one'
              [4] = ':END:'
              [5] = '#+FILETAGS: :one:'
              [6] = ''
             *[7] = '[[id:2]]' }
            Expected:
            (table: 0x7f87d5e788) {
              [1] = ':PROPERTIES:'
              [2] = ':ID: 1'
              [3] = ':ROAM_ALIASES: one'
              [4] = ':END:'
              [5] = '#+FILETAGS: :one:'
              [6] = ''
             *[7] = '[[id:4c99cf7e-ca39-4238-846c-55384fe1e8aa][some custom node]][[id:2]]' }

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:189: in function <.../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:151>
Fail    ||  org-roam.api.node should create a new node and navigate to it if find with non-existing node    
            .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:312: Expected objects to be the same.
            Passed in:
            (table: 0x7f87d5e59ec8) {
              [1] = ':PROPERTIES:'
             *[2] = ':ID: 1'
              [3] = ':ROAM_ALIASES: one'
              [4] = ':END:'
              [5] = '#+FILETAGS: :one:'
              [6] = ''
              [7] = '[[id:2]]' }
            Expected:
            (table: 0x7f87d616ff88) {
              [1] = ':PROPERTIES:'
             *[2] = ':ID: 578e7e09-cf85-44f0-8edb-13c9c770e2ee'
              [3] = ':ROAM_ORIGIN: 1'
              [4] = ':END:'
              [5] = '#+TITLE: some custom node'
              [6] = ''
              [7] = '' }

            stack traceback:
                .../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:312: in function <.../work/org-roam.nvim/org-roam.nvim/spec/api_node_spec.lua:278>

Example run: https://github.com/chipsenkbeil/org-roam.nvim/actions/runs/8794224351/job/24133334994

chipsenkbeil commented 7 months ago
Fail    ||  org-roam.setup.keybindings toggle_roam_buffer_fixed keybinding should open roam buffer for selected node    
            ...-roam.nvim/org-roam.nvim/spec/setup_keybindings_spec.lua:442: Expected objects to be the same.
            Passed in:
            (table: 0x7efc51e784f0) {
             *[1] = '' }
            Expected:
            (table: 0x7efc51e78418) {
             *[1] = 'Press <Enter> to open a link in another window'
              [2] = 'Press <Tab> to expand/collapse a link'
              [3] = 'Press <S-Tab> to expand/collapse all links'
              [4] = 'Press <C-r> to refresh buffer'
              [5] = ''
              [6] = 'Fixed Node: two'
              [7] = 'Origin: one'
              [8] = ''
              [9] = 'Backlinks (1)'
              [10] = '▶ one @ 7,0' }

            stack traceback:
                ...-roam.nvim/org-roam.nvim/spec/setup_keybindings_spec.lua:442: in function <...-roam.nvim/org-roam.nvim/spec/setup_keybindings_spec.lua:415>

Example run: https://github.com/chipsenkbeil/org-roam.nvim/actions/runs/8795050156/job/24135507855

chipsenkbeil commented 6 months ago

Closing out for now. Adding retry logic to our tests and a longer timeout fixes the issue, alongside #29 to resolve some recent failure in neovim nightly.