Skip to content

Conversation

@zeppelin44
Copy link

No description provided.

@github-actions github-actions bot added the type: tests Testing related label Jul 8, 2025
@zeppelin44 zeppelin44 requested a review from njlie July 8, 2025 12:56
@github-actions
Copy link

github-actions bot commented Jul 8, 2025

🚀 Performance Test Results

Test Configuration:

  • VUs: 4
  • Duration: 1m0s

Test Metrics:

  • Requests/s: 40.93
  • Iterations/s: 13.66
  • Failed Requests: 0.00% (0 of 2463)
📜 Logs

> [email protected] run-tests:testenv /home/runner/work/rafiki/rafiki/test/performance
> ./scripts/run-tests.sh -e test "-k" "-q" "--vus" "4" "--duration" "1m"

Cloud Nine GraphQL API is up: http://localhost:3101/graphql
Cloud Nine Wallet Address is up: http://localhost:3100/
Happy Life Bank Address is up: http://localhost:4100/
cloud-nine-wallet-test-backend already set
cloud-nine-wallet-test-auth already set
happy-life-bank-test-backend already set
happy-life-bank-test-auth already set
     data_received..................: 889 kB 15 kB/s
     data_sent......................: 1.9 MB 31 kB/s
     http_req_blocked...............: avg=7.36µs   min=2.38µs   med=5.1µs    max=734.67µs p(90)=6.65µs   p(95)=7.42µs  
     http_req_connecting............: avg=604ns    min=0s       med=0s       max=679.06µs p(90)=0s       p(95)=0s      
     http_req_duration..............: avg=97.09ms  min=7.1ms    med=79.86ms  max=924.95ms p(90)=166.65ms p(95)=187.85ms
       { expected_response:true }...: avg=97.09ms  min=7.1ms    med=79.86ms  max=924.95ms p(90)=166.65ms p(95)=187.85ms
     http_req_failed................: 0.00%  ✓ 0         ✗ 2463
     http_req_receiving.............: avg=86.31µs  min=25.38µs  med=76.35µs  max=2.48ms   p(90)=118.76µs p(95)=149.1µs 
     http_req_sending...............: avg=35.46µs  min=10.43µs  med=27.49µs  max=2.33ms   p(90)=40.95µs  p(95)=53.76µs 
     http_req_tls_handshaking.......: avg=0s       min=0s       med=0s       max=0s       p(90)=0s       p(95)=0s      
     http_req_waiting...............: avg=96.97ms  min=6.93ms   med=79.76ms  max=924.83ms p(90)=166.5ms  p(95)=187.77ms
     http_reqs......................: 2463   40.930909/s
     iteration_duration.............: avg=292.59ms min=177.89ms med=279.48ms max=1.09s    p(90)=341.19ms p(95)=388.47ms
     iterations.....................: 822    13.660255/s
     vus............................: 4      min=4       max=4 
     vus_max........................: 4      min=4       max=4 

): Promise<string> => {
const POSHost = await deps.redis.get(requestId)
if (!POSHost) {
deps.logger.error(`No POS found for requestId: ${requestId}`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: With the pino logger we usually pass in an object with relevant data, then the message - for example:

deps.logger.error({ requestId }, 'No POS found for requestId')

requestId: string,
POSHost: string
) => {
await deps.redis.set(requestId, POSHost)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add an expiry as well. Maybe like five minutes or something.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added 5 minutes for now, maybe we can have it configurable in the future - i dont think anybody will wait 5 minutes at a pos for a response

Copy link
Contributor

@njlie njlie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I would consider merging in the changes from #3533 or waiting for it to be merged into the feature branch to avoid having to redo the tests for this feature in another PR.

@njlie njlie merged commit 2d4fe93 into pos-card-services Jul 10, 2025
38 checks passed
@njlie njlie deleted the card_service-redis-client branch July 10, 2025 08:00
njlie pushed a commit that referenced this pull request Aug 18, 2025
…ceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>
njlie pushed a commit that referenced this pull request Aug 19, 2025
…ceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>
njlie pushed a commit that referenced this pull request Aug 21, 2025
…ceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>
njlie added a commit that referenced this pull request Aug 26, 2025
* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(backend): publish webhooks to POS service if applicable

* feat: add column to incoming payment

* fix: tests

* feat: add warn log

* fix: better logger requirements for finalizing webhook recipients

* fix: make open payments default reason for incoming payment initialization

* fix: improve optional env var function

* fix: warn log, better optional env, backfill migration, tests

* fix: rebase bugs

* chore: regenerate lockfile

* chore: regenerate gql

* fix: tests

* fix: remove metadata; better tests

* fix: build errors

* fix: tests, add type file

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>
njlie pushed a commit that referenced this pull request Aug 26, 2025
…ceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>
njlie added a commit that referenced this pull request Aug 26, 2025
…backend (#3613)

* feat: created the backbone for the card service (#3508)

* Created the backbone for the card service

* Format fix

* feat: add card service to docker compose

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: initialize POS service (#3509)

* feat(wip): pos service

* Completed POS service init

* Added docker files and missing scripts

* Removed editor code after handling conflicts

* Updated docker-compose for cloud 9 localenv and removed unnecessary telemetry command from dockerfile

* Updated docker compose files for c9 and hlb

* Updated ports and env var names from config

* fix: install ts-node-dev, add main script to index.ts

---------

Co-authored-by: Nathan Lie <[email protected]>

* feat: Integrate Redis client in Card Service for (requestId, posServiceHost) mapping (#3524)

* Integrate Redis client in Card Service for (requestId, posServiceHost) mapping

* remove unused dep

* prettier fix

* Separate logging params from the message itself

* ttl

* prettier fix

* Rewrite redis service tests to use testcontainers instead of mocks

---------

Co-authored-by: Antoniu Neacsu <[email protected]>

* feat(point-of-sale): added route for registering a POS device (#3555)

* Route for registering a POS device

* Fixed issue addressed in comments, tried to fix the port issue of jest

* Changed test container port to 0, format fix

* feat(wip): merge pos-card-services

* feat(point-of-sale): handle incoming payment completed webhooks from backend

* fix: typo, expose incoming payment url in gql

* fix: typo & unintended changes

* chore: regenerate gql

* feat: clean up request map if wehbook times out

---------

Co-authored-by: oana-lolea <[email protected]>
Co-authored-by: zeppelin44 <[email protected]>
Co-authored-by: Antoniu Neacsu <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: tests Testing related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants