Commit 3188ae9a authored by Francis Dupont's avatar Francis Dupont
Browse files

[master] Merged trac5062 (time skew in requestPrefixInRenew)

parents 8024aeae 44bc4410
// Copyright (C) 2015-2016 Internet Systems Consortium, Inc. ("ISC") // Copyright (C) 2015-2017 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_TEST_TIMING
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment