Project

General

Profile

Task #3830

Make ASF strategy tests predictable

Added by Ashlesh Gawande almost 4 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Forwarding
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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.

#1

Updated by Junxiao Shi almost 4 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.

#2

Updated by Junxiao Shi almost 4 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
#3

Updated by Ashlesh Gawande almost 4 years ago

  • Description updated (diff)
#4

Updated by Junxiao Shi about 3 years ago

  • Category set to Forwarding
#5

Updated by Ashlesh Gawande over 2 years ago

  • Assignee set to Saurab Dulal
#6

Updated by Davide Pesavento over 1 year ago

  • Tags set to UnitTests
  • Start date deleted (10/27/2016)

Also available in: Atom PDF