Add DeadlineMatcher with tests
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 6 Oct 2017 19:52:53 +0000 (21:52 +0200)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 27 Apr 2018 15:34:20 +0000 (17:34 +0200)
commitbb6cbf25a23f5ec4970e72cdb4bb731a9bc84dbb
treee62b07d711da9ba1e298ef70a68799cde8efdec3
parent8449acda09a55dfc750fb20bd11eaa064dd15efe
Add DeadlineMatcher with tests

DeadlineMatcher is a Matcher interface implementation for handling
pending requests timeouts caused by expiration of Deadline times.

It tries to set Timeout on all reported requests. Some of the timeouts
might be invalid, because the request has change it's state
to canceled or running; or the Deadline time itself has been changed.

Tests base on using MockRequestsManager for mocking up RequestsManager
interface.

Change-Id: I4d790b58a26aa7389250ff57b6bfad662d4d3f7b
Signed-off-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
matcher/deadlinematcher.go [new file with mode: 0644]
matcher/deadlinematcher_test.go [new file with mode: 0644]