Fix NetconfNodeHandler.connect() accounting
The accounting is off-by-one, as the first attempt, triggered through
connect() is not correctly accounter for.
This also adds a unit test to cover this and some other basic scenarios.
JIRA: NETCONF-1119
Change-Id: I02781e92423456460c0e780c657acae0e7bae9bf
Signed-off-by: Ivan Hrasko <ivan.hrasko@pantheon.tech>
Signed-off-by: Matej Sramcik <matej.sramcik@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
950197562f24cdadcfaf5a6a1e65c4b7df0490c0)