Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid 2 extra db requests #1054

Draft
wants to merge 72 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
0b62904
feat: added db migration scripts for fx
vijayg10 Nov 8, 2023
0062b7a
feat(3574): update prepare-handler to deal with FX transfers (#988)
geka-evk Nov 16, 2023
07f2888
feat(3574): added FX endpoints to seeds (#989)
geka-evk Nov 17, 2023
a70d482
feat: implement changes in position handler for FX (#986)
vijayg10 Nov 22, 2023
2dc6a1f
chore(snapshot): 17.4.0-snapshot.3
vijayg10 Nov 22, 2023
fbc3252
chore(snapshot): 17.4.0-snapshot.4
vijayg10 Nov 22, 2023
e9d0ba2
chore(snapshot): 17.4.0-snapshot.5
vijayg10 Nov 22, 2023
853c90a
chore(snapshot): 17.4.0-snapshot.6
vijayg10 Nov 22, 2023
745802f
chore(snapshot): 17.4.0-snapshot.7
vijayg10 Nov 22, 2023
55d56f5
chore(snapshot): 17.4.0-snapshot.8
vijayg10 Nov 22, 2023
7f5c80d
fix: positions
vijayg10 Nov 22, 2023
98f7fdc
fix: disable unit tests for snapshot
vijayg10 Nov 22, 2023
1fb4904
chore(snapshot): 17.4.0-snapshot.9
vijayg10 Nov 22, 2023
70d0732
chore: added docs
vijayg10 Nov 22, 2023
29136ea
chore: updated doc
vijayg10 Nov 23, 2023
a883a33
fix: normal fulfil
vijayg10 Nov 23, 2023
8be45cd
fix: normal flow
vijayg10 Nov 23, 2023
cbfe0dd
fix: updated fx diagram
vijayg10 Nov 28, 2023
c3e8af8
chore: dep update
vijayg10 Dec 4, 2023
a0e5ae6
chore(snapshot): 17.4.0-snapshot.10
vijayg10 Dec 4, 2023
77e7ff1
feat(mojaloop/#3689): fx quotes changes (#995)
oderayi Mar 8, 2024
224a3d3
chore(snapshot): 17.4.0-snapshot.12
oderayi Mar 8, 2024
c2b64c7
ci: disable unit tests and test coverage runs for snapshots
oderayi Mar 8, 2024
8155ba0
chore(snapshot): 17.4.0-snapshot.13
oderayi Mar 8, 2024
1dc7032
Merge branch main of https://github.com/mojaloop/central-ledger into …
vijayg10 Mar 13, 2024
831da00
Merge branch feat/fx-impl of https://github.com/mojaloop/central-ledg…
vijayg10 Mar 13, 2024
0979ae5
fix: manual changes from upstream commits
vijayg10 Mar 13, 2024
6df1384
chore(snapshot): 17.7.0-snapshot.0
vijayg10 Mar 13, 2024
5df3536
chore(mojaloop/#3820): fix current tests and merge in main (#1000)
kleyow Apr 2, 2024
b4ad846
test(mojaloop/#3819): harden fx prepare flow (#1002)
kleyow Apr 10, 2024
4218622
Merge branch 'main' into feat/fx-impl
geka-evk Apr 18, 2024
d917f00
test(mojaloop/#3819): prepare handler testing (#1004)
kleyow Apr 22, 2024
cf80376
chore: standardise position prepare handler (#1005)
vijayg10 Apr 23, 2024
46d7adb
feat(mojaloop/#3844): added corner cases impl. for FX; added unit-tes…
geka-evk Apr 23, 2024
ad4dd53
fix: removed fx position prepare integration tests in non batch mode …
vijayg10 Apr 24, 2024
82d2bd4
chore: fix int tests, lint and update deps (#1013)
kleyow Apr 26, 2024
05c4ce9
chore: removed unneeded kafkaHelper; excluded some files from test-co…
geka-evk Apr 27, 2024
afc4c5c
feat(mojaloop/#3844): added integration tests for fxFulfil flow (#1011)
geka-evk Apr 29, 2024
d1e1fcc
test: added transferFulfilReject.end() (#1027)
geka-evk Apr 30, 2024
cb9de40
feat: fx fulfil position batching (#1019)
vijayg10 May 1, 2024
13c95ae
chore(mojaloop/#3819): update functional tests and move fulfil int te…
kleyow May 2, 2024
7124fab
chore: add integration tests for pos fulfil fx (#1030)
vijayg10 May 3, 2024
5988eae
feat(mojaloop/#3818): added sequence and ER diagrams for transfer/fxT…
geka-evk May 7, 2024
3dba614
feat(mojaloop/#3903): update interal state on fx fulfil to RECEIVED_F…
kleyow May 10, 2024
031e16c
chore: update harness (#1031)
kleyow May 10, 2024
0b6606a
feat(mojaloop/#3904): add position event timeout reserved batch handl…
kleyow May 17, 2024
85c3499
Update README.md
vijayg10 May 27, 2024
8194902
feat: implemented timeout handler for fx (#1036)
vijayg10 May 28, 2024
f2e84ea
Merge branch main of https://github.com/mojaloop/central-ledger into …
vijayg10 May 28, 2024
1c76665
feat: enable sending events directly to Kafka (#1037)
kalinkrustev May 28, 2024
0eea335
chore(snapshot): 17.7.0-snapshot.3
kalinkrustev May 28, 2024
08c295d
feat(mojaloop/#3904): add position event fx timeout reserved batch ha…
kleyow May 31, 2024
88724f0
chore(snapshot): 17.7.0-snapshot.4
kleyow Jun 5, 2024
f71911d
audit fix and dep update
kleyow Jun 5, 2024
6d644f3
audit fix and dep update
kleyow Jun 5, 2024
7df16eb
chore(snapshot): 17.7.0-snapshot.5
kleyow Jun 5, 2024
97f5f70
image scan
kleyow Jun 5, 2024
08dd88b
chore(snapshot): 17.7.0-snapshot.6
kleyow Jun 5, 2024
e3caa32
image scan
kleyow Jun 5, 2024
e8f7816
chore(snapshot): 17.7.0-snapshot.7
kleyow Jun 5, 2024
3face13
node version
kleyow Jun 5, 2024
a653a02
chore(snapshot): 17.7.0-snapshot.8
kleyow Jun 5, 2024
7185622
revert pipeline changes to get working snapshot
kleyow Jun 7, 2024
42c84b3
chore(snapshot): 17.7.0-snapshot.9
kleyow Jun 7, 2024
5600fe1
fix typo
kleyow Jun 7, 2024
930ed0e
chore(snapshot): 17.7.0-snapshot.10
kleyow Jun 7, 2024
9498a49
fix command
kleyow Jun 7, 2024
77764c9
chore(snapshot): 17.7.0-snapshot.11
kleyow Jun 7, 2024
c484da7
fix: remove trx.rollback() (#1051)
kalinkrustev Jun 13, 2024
6736dee
fix: produce followup messages in parallel (#1052)
kalinkrustev Jun 13, 2024
ca5dca5
chore(snapshot): 17.7.0-snapshot.12
kalinkrustev Jun 13, 2024
d59b902
fix: avoid 2 extra db requests
kalinkrustev Jun 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: removed fx position prepare integration tests in non batch mode (#…
  • Loading branch information
vijayg10 authored Apr 24, 2024
commit ad4dd53d6914628813aa30a1dcd3af2a55f12b0d
18 changes: 0 additions & 18 deletions test/integration/handlers/transfers/handlers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1501,29 +1501,11 @@ Test('Handlers test', async handlersTest => {
keyFilter: td.payer.participantCurrencyId.toString()
}), wrapWithRetriesConf.remainingRetries, wrapWithRetriesConf.timeout)
test.ok(positionPrepare[0], 'Position fx-prepare message with key found')

const payerCurrentPosition = await ParticipantService.getPositionByParticipantCurrencyId(td.payer.participantCurrencyId) || {}
const payerInitialPosition = td.payerLimitAndInitialPosition.participantPosition.value
const payerExpectedPosition = payerInitialPosition + td.transferPayload.sourceAmount.amount
const payerPositionChange = await ParticipantService.getPositionChangeByParticipantPositionId(payerCurrentPosition.participantPositionId) || {}
test.equal(producerResponse, true, 'Producer for prepare published message')
test.equal(payerCurrentPosition.value, payerExpectedPosition, 'Payer position incremented by transfer amount and updated in participantPosition')
test.equal(payerPositionChange.value, payerCurrentPosition.value, 'Payer position change value inserted and matches the updated participantPosition value')
} catch (err) {
test.notOk('Error should not be thrown')
console.error(err)
}

try {
const positionPrepare = await wrapWithRetries(() => testConsumer.getEventsForFilter({
topicFilter: 'topic-notification-event',
action: 'fx-prepare'
}), wrapWithRetriesConf.remainingRetries, wrapWithRetriesConf.timeout)
test.ok(positionPrepare[0], 'Notification fx-prepare message with key found')
} catch (err) {
test.notOk('Error should not be thrown')
console.error(err)
}
test.end()
})

Expand Down