https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232016-10-27T19:54:22ZNDN project issue tracking systemNFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=174042016-10-27T19:54:22ZJunxiao Shi
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/17404/diff?detail_id=15226">diff</a>)</li></ul><p>Changed GitHub link to point to exact commit hash, so that it stays relevant even if the <code>master</code> branch changes in the future.</p>
NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=174052016-10-27T20:37:39ZJunxiao Shi
<ul></ul><p>I've read the test case.<br>
In its current logic, the same <code>AsfStrategy</code> 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:</p>
<table><thead>
<tr>
<th>batch</th>
<th>A-B</th>
<th>A-D</th>
</tr>
</thead><tbody>
<tr>
<td>0</td>
<td>>=24</td>
<td><=6</td>
</tr>
<tr>
<td>1</td>
<td><=30</td>
<td>>=30</td>
</tr>
<tr>
<td>2</td>
<td>>=50</td>
<td><=40</td>
</tr>
<tr>
<td>3</td>
<td><=60</td>
<td>>=60</td>
</tr>
</tbody></table>
<p>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.<br>
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.</p>
<p>My suggestion is to reset the counters to zero before processing each batch, and change the assertions as follows:</p>
<table><thead>
<tr>
<th>batch</th>
<th>A-B</th>
<th>A-D</th>
</tr>
</thead><tbody>
<tr>
<td>0</td>
<td>>=24</td>
<td><=6</td>
</tr>
<tr>
<td>1</td>
<td><=6</td>
<td>>=24</td>
</tr>
<tr>
<td>2</td>
<td>>=20</td>
<td><=10</td>
</tr>
<tr>
<td>3</td>
<td><=10</td>
<td>>=20</td>
</tr>
</tbody></table>
NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=174092016-10-28T07:54:26ZAshlesh Gawande
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/17409/diff?detail_id=15229">diff</a>)</li></ul> NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=192762017-05-27T08:44:42ZJunxiao Shi
<ul><li><strong>Category</strong> set to <i>Forwarding</i></li></ul> NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=223752018-02-15T10:36:13ZAshlesh Gawande
<ul><li><strong>Assignee</strong> set to <i>Saurab Dulal</i></li></ul> NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=242852018-11-07T22:28:35ZDavide Pesavento
<ul><li><strong>Tags</strong> set to <i>UnitTests</i></li><li><strong>Start date</strong> deleted (<del><i>10/27/2016</i></del>)</li></ul> NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=278722023-05-25T19:41:17ZDavide Pesavento
<ul><li><strong>Tags</strong> changed from <i>unit-tests</i> to <i>unit-tests, ASF</i></li></ul> NFD - Task #3830: Make ASF strategy tests predictablehttps://redmine.named-data.net/issues/3830?journal_id=282622024-02-02T23:15:30ZDavide Pesavento
<ul><li><strong>Category</strong> changed from <i>Forwarding</i> to <i>Unit Tests</i></li><li><strong>Assignee</strong> deleted (<del><i>Saurab Dulal</i></del>)</li></ul>