Skip to content

Fix "Failed to find the thread indexes for given tab ..." warnings in tests #6049

@canova

Description

@canova

Similar to #6048, since it's easier to spot the warnings, I also see these:

 PASS   browser  src/test/url-handling.test.ts
  ● Console

    console.warn
      Failed to find the thread indexes for given tab 123

      808 |     // This is not really a possible path. It might indicate a bug on the frontend
      809 |     // or backend.
    > 810 |     console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
          |             ^
      811 |     return globalTracks;
      812 |   }
      813 |

      at warn (src/profile-logic/tracks.ts:810:13)
      at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
      at src/actions/receive-profile.ts:1389:45
      at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
      at Object.dispatch (src/test/url-handling.test.ts:2116:5)

    console.warn
      Failed to find the thread indexes for given tab 321

      808 |     // This is not really a possible path. It might indicate a bug on the frontend
      809 |     // or backend.
    > 810 |     console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
          |             ^
      811 |     return globalTracks;
      812 |   }
      813 |

      at warn (src/profile-logic/tracks.ts:810:13)
      at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
      at src/actions/receive-profile.ts:1389:45
      at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
      at Object.dispatch (src/test/url-handling.test.ts:2128:5)

    console.warn
      Failed to find the thread indexes for given tab 123

      808 |     // This is not really a possible path. It might indicate a bug on the frontend
      809 |     // or backend.
    > 810 |     console.warn(`Failed to find the thread indexes for given tab ${tabID}`);
          |             ^
      811 |     return globalTracks;
      812 |   }
      813 |

      at warn (src/profile-logic/tracks.ts:810:13)
      at filterGlobalTracksByTab (src/profile-logic/tracks.ts:774:18)
      at src/actions/receive-profile.ts:267:45
      at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
      at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
      at dispatch (src/actions/receive-profile.ts:216:5)
      at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
      at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
      at dispatch (src/actions/receive-profile.ts:176:13)
      at node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14
      at dispatch (node_modules/redux/src/applyMiddleware.ts:52:38)
      at dispatch (src/actions/receive-profile.ts:423:11)
      at Object.dispatch (node_modules/redux-thunk/dist/cjs/redux-thunk.cjs:30:14)
      at dispatch (src/test/url-handling.test.ts:112:11)
      at Object._getStoreWithURL (src/test/url-handling.test.ts:2153:26)

I don't know yet if they are real issues or just warnings because we didn't add/update the pages array. Would be good to get rid of them too.

┆Issue is synchronized with this Jira Task

Metadata

Metadata

Assignees

No one assigned

    Labels

    code maintenanceIssues that are not user facing, but are related the technical debt with the code itselftestsAnything related to tests

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions