Skip to content

Commit a5ba3f8

Browse files
committed
pytest: reduce askrene tests again for CI.
``` 2024-11-14T23:50:43.8609029Z test_real_data failed (1 runs remaining out of 2). 2024-11-14T23:50:43.8609157Z <class 'Failed'> 2024-11-14T23:50:43.8609244Z Timeout >1200.0s ... 2024-11-14T23:50:43.8629292Z test_real_biases failed (1 runs remaining out of 2). 2024-11-14T23:50:43.8629407Z <class 'Failed'> 2024-11-14T23:50:43.8629494Z Timeout >1200.0s ``` Signed-off-by: Rusty Russell <[email protected]>
1 parent dd569b0 commit a5ba3f8

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

tests/test_askrene.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,8 @@ def test_real_data(node_factory, bitcoind):
10331033

10341034
# CI, it's slow.
10351035
if SLOW_MACHINE:
1036-
limit = 50
1037-
expected = (7, 49, 2912123, 259464, 92)
1036+
limit = 25
1037+
expected = (4, 25, 1533317, 143026, 91)
10381038
else:
10391039
limit = 100
10401040
expected = (8, 95, 6007785, 564997, 91)
@@ -1148,13 +1148,21 @@ def test_real_biases(node_factory, bitcoind):
11481148
97: r"We could not find a usable set of paths\. The shortest path is 103x1x0->0x3301x1646->0x1281x2323->97x1281x33241, but 97x1281x33241/1 isn't big enough to carry 100000000msat\.",
11491149
}
11501150

1151+
# CI, it's slow.
1152+
if SLOW_MACHINE:
1153+
limit = 25
1154+
expected = ({1: 4, 2: 5, 4: 7, 8: 11, 16: 14, 32: 19, 64: 25, 100: 25}, 0)
1155+
else:
1156+
limit = 100
1157+
expected = ({1: 19, 2: 25, 4: 36, 8: 51, 16: 66, 32: 81, 64: 96, 100: 96}, 0)
1158+
11511159
l1.rpc.askrene_create_layer('biases')
11521160
num_changed = {}
11531161
bias_ineffective = 0
11541162

11551163
for bias in (1, 2, 4, 8, 16, 32, 64, 100):
11561164
num_changed[bias] = 0
1157-
for n in range(0, 100):
1165+
for n in range(0, limit):
11581166
# 0.5% is the norm
11591167
MAX_FEE = AMOUNT // 200
11601168

@@ -1216,7 +1224,7 @@ def amount_through_chan(chan, routes):
12161224
enabled=True)
12171225

12181226
# With e^(-bias / (100/ln(30))):
1219-
assert (num_changed, bias_ineffective) == ({1: 19, 2: 25, 4: 36, 8: 51, 16: 66, 32: 81, 64: 96, 100: 96}, 0)
1227+
assert (num_changed, bias_ineffective) == expected
12201228

12211229

12221230
@pytest.mark.slow_test

0 commit comments

Comments
 (0)