Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
837cace8
Commit
837cace8
authored
Mar 14, 2017
by
Francis Dupont
Browse files
[5062] Added provision for time skew
parent
bdf3bae8
Changes
1
Show whitespace changes
Inline
Side-by-side
src/bin/dhcp6/tests/renew_unittest.cc
View file @
837cace8
// Copyright (C) 2015-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2015-201
7
Internet Systems Consortium, Inc. ("ISC")
//
//
// This Source Code Form is subject to the terms of the Mozilla Public
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
@@ -290,8 +290,16 @@ TEST_F(RenewTest, requestPrefixInRenew) {
...
@@ -290,8 +290,16 @@ TEST_F(RenewTest, requestPrefixInRenew) {
ASSERT_EQ
(
1
,
leases_client_na_renewed
.
size
());
ASSERT_EQ
(
1
,
leases_client_na_renewed
.
size
());
EXPECT_EQ
(
STATUS_Success
,
client
.
getStatusCode
(
na_iaid_
));
EXPECT_EQ
(
STATUS_Success
,
client
.
getStatusCode
(
na_iaid_
));
// The lease should have been renewed.
// The lease should have been renewed. Allow some time skew.
EXPECT_EQ
(
1000
,
leases_client_na_renewed
[
0
].
cltt_
-
leases_client_na
[
0
].
cltt_
);
#ifdef STRICT_REQUEST_PREFIX_IN_RENEW
EXPECT_EQ
(
1000
,
leases_client_na_renewed
[
0
].
cltt_
-
leases_client_na
[
0
].
cltt_
);
#else
EXPECT_LE
(
995
,
leases_client_na_renewed
[
0
].
cltt_
-
leases_client_na
[
0
].
cltt_
);
EXPECT_GE
(
1005
,
leases_client_na_renewed
[
0
].
cltt_
-
leases_client_na
[
0
].
cltt_
);
#endif
// The client should now also acquire a PD lease.
// The client should now also acquire a PD lease.
leases_client_pd
=
client
.
getLeasesByType
(
Lease
::
TYPE_PD
);
leases_client_pd
=
client
.
getLeasesByType
(
Lease
::
TYPE_PD
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment