Task #3830
openMake ASF strategy tests predictable
0%
Description
https://gerrit.named-data.net/3255 breaks the tests at line:
https://github.com/named-data/NFD/blob/8a4c29e8db5e6fd588b2d797f8f90110dc1083a8/tests/daemon/fw/asf-strategy.t.cpp#L161
(61 > 60) on some machines.
We should be able to predict the outcome better.
Updated by Junxiao Shi about 8 years ago
- Description updated (diff)
Changed GitHub link to point to exact commit hash, so that it stays relevant even if the master
branch changes in the future.
Updated by Junxiao Shi about 8 years ago
I've read the test case.
In its current logic, the same AsfStrategy
instance is used to make decisions for four batches of 30 Interests from a consumer, and the Interest counters on A-B and A-D links are asserted as follows:
batch | A-B | A-D |
---|---|---|
0 | >=24 | <=6 |
1 | <=30 | >=30 |
2 | >=50 | <=40 |
3 | <=60 | >=60 |
These assertions are badly designed, because every assertion tests the accumulative packet counter since the beginning, while the behavior in each batch is independent from the counter value before processing this batch.
For example, batch2 A-B assertion will pass when A-B counter is either 50 or 58, but the former allows batch3 to increment this counter by up to 10 while the latter only permits an increment of no more than 2.
My suggestion is to reset the counters to zero before processing each batch, and change the assertions as follows:
batch | A-B | A-D |
---|---|---|
0 | >=24 | <=6 |
1 | <=6 | >=24 |
2 | >=20 | <=10 |
3 | <=10 | >=20 |
Updated by Davide Pesavento about 6 years ago
- Tags set to UnitTests
- Start date deleted (
10/27/2016)
Updated by Davide Pesavento over 1 year ago
- Tags changed from unit-tests to unit-tests, ASF
Updated by Davide Pesavento 10 months ago
- Category changed from Forwarding to Unit Tests
- Assignee deleted (
Saurab Dulal)