OpenFn / OpenFn/kit

Integration tests: Server lifecycle

Open
#458 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

DevX
Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

Add a suite of unit tests, probably called server.test.ts, which are all about basic server comms (not actual attempt runs)

  • what happens if lightning goes away?
  • what happens if it comes back?
  • What happens if the queue jwt is wrong?
  • What happens to the attempt channel if the server goes away?

I don't think there's any good way to leave a 5 minute disconnect and reconnect loop, which isn't great for testing. Perhaps I can leave a disabled test.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the server communication code and the proposed server.test.ts test entry point. Define tests for Lightning disconnect and recovery, an invalid queue JWT, and the attempt channel when the server goes away; completion means these lifecycle cases are covered without requiring a five-minute reconnect loop, or with any such test explicitly disabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
distributed-systems, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.