mirror of
https://github.com/haveno-dex/haveno-ts.git
synced 2024-12-24 23:09:26 -05:00
reduce trade concurrency to 4 in GitHub Actions
This commit is contained in:
parent
b304139779
commit
28a47e1aba
@ -143,11 +143,10 @@ const defaultTradeConfig: Partial<TradeContext> = {
|
||||
disputeSummary: "Seller is winner",
|
||||
walletSyncPeriodMs: 5000,
|
||||
maxTimePeerNoticeMs: 5000,
|
||||
maxConcurrency: 14, // max concurrency
|
||||
maxConcurrencyCI: 7, // CI test max concurrency
|
||||
stopOnFailure: true,
|
||||
testPayoutConfirmed: true,
|
||||
testPayoutUnlocked: false
|
||||
testPayoutUnlocked: false,
|
||||
maxConcurrency: getMaxConcurrency()
|
||||
}
|
||||
|
||||
/**
|
||||
@ -217,8 +216,6 @@ class TradeContext {
|
||||
isPayoutUnlocked?: boolean
|
||||
buyerOpenedDispute?: boolean;
|
||||
sellerOpenedDispute?: boolean;
|
||||
maxConcurrency?: number;
|
||||
maxConcurrencyCI?: number;
|
||||
walletSyncPeriodMs: number;
|
||||
maxTimePeerNoticeMs: number;
|
||||
stopOnFailure?: boolean;
|
||||
@ -230,6 +227,7 @@ class TradeContext {
|
||||
payoutTxId?: string
|
||||
testBalanceChangeEndToEnd?: boolean;
|
||||
isStopped: boolean;
|
||||
maxConcurrency: number;
|
||||
|
||||
constructor(ctx?: Partial<TradeContext>) {
|
||||
Object.assign(this, ctx);
|
||||
@ -1647,7 +1645,7 @@ test("Can complete trades at the same time (CI, sanity check)", async () => {
|
||||
}
|
||||
|
||||
// execute trades with capped concurrency for CI tests
|
||||
await executeTrades(ctxs, {maxConcurrency: TestConfig.trade.maxConcurrencyCI});
|
||||
await executeTrades(ctxs);
|
||||
});
|
||||
|
||||
test("Can complete all trade combinations (stress)", async () => {
|
||||
@ -3874,6 +3872,14 @@ function testMoneroNodeSettingsEqual(settingsBefore: XmrNodeSettings, settingsAf
|
||||
expect(settingsAfter.getStartupFlagsList()).toEqual(settingsBefore.getStartupFlagsList());
|
||||
}
|
||||
|
||||
function getMaxConcurrency() {
|
||||
return isGitHubActions() ? 4 : 14;
|
||||
}
|
||||
|
||||
function isGitHubActions() {
|
||||
return process.env.GITHUB_ACTIONS === 'true';
|
||||
}
|
||||
|
||||
function getFormField(form: PaymentAccountForm, fieldId: PaymentAccountFormField.FieldId): PaymentAccountFormField {
|
||||
for (const field of form.getFieldsList()) {
|
||||
if (field.getId() == fieldId) return field;
|
||||
|
Loading…
Reference in New Issue
Block a user