Skip to content

Commit 5e4a6c0

Browse files
committed
Travis CI is not blocking communication on the 123 port, tests are working as expected.
1 parent 03c2d67 commit 5e4a6c0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

test/ntp-client_test.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@
3333

3434
ntpClient.getNetworkTime(ntpClient.defaultNtpServer, ntpClient.defaultNtpPort, function (err, date) {
3535
var now = new Date();
36+
37+
console.log();
38+
console.log("System reported : %s", now);
39+
3640
test.ok(err === null);
3741
test.ok(date !== null);
3842

39-
test.equal(now.getDate(), date.getDate()); // I'm pretty sure the date things will be OK
40-
test.equal(now.getMonth(), date.getMonth());
41-
test.equal(now.getYear(), date.getYear());
43+
console.log("NTP Reported : %s", date);
4244

43-
// For the hours and minute parts, really depends if testing machine is synched
44-
test.equal(now.getHours(), date.getHours());
45+
// I won't test returned datetime against the system datetime
46+
// this is the whole purpose of NTP : putting clocks in sync.
4547
});
4648

4749
// I'm pretty sure there is no NTP Server listening at google.com

0 commit comments

Comments
 (0)