Title: [opsview] [5344] Put a bit more tolerance to the test_events as causing build failures on slow build servers
Revision
5344
Author
tvoon
Date
2010-11-10 08:58:40 +0000 (Wed, 10 Nov 2010)

Log Message

Put a bit more tolerance to the test_events as causing build failures on slow build servers

Modified Paths

Added Paths

Modified: trunk/opsview-base/Makefile
===================================================================
--- trunk/opsview-base/Makefile	2010-11-09 10:22:50 UTC (rev 5343)
+++ trunk/opsview-base/Makefile	2010-11-10 08:58:40 UTC (rev 5344)
@@ -439,6 +439,7 @@
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_remove_unnecessary_status_update.patch
 	# Below in Nagios 3.2.4+
 	cd ${NAGIOS} && patch -p1 < ../patches/nagios_extinfo_tidyups.patch
+	cd ${NAGIOS} && patch -p1 < ../patches/nagios_test_events_more_tolerant.patch
 	if [ `uname -s` = Linux ] ; then \
 		cd ${NAGIOS} && CFLAGS="${CFLAGS}" ./configure --with-nagios-user=$(NAGIOS_USER) --with-nagios-group=$(NAGIOS_GROUP) --with-command-group=$(NAGIOS_GROUP) --with-cgiurl=/cgi-bin --with-htmurl=/ --enable-libtap ; \
 	elif [ `uname -s` = Darwin ] ; then \

Added: trunk/opsview-base/patches/nagios_test_events_more_tolerant.patch
===================================================================
--- trunk/opsview-base/patches/nagios_test_events_more_tolerant.patch	                        (rev 0)
+++ trunk/opsview-base/patches/nagios_test_events_more_tolerant.patch	2010-11-10 08:58:40 UTC (rev 5344)
@@ -0,0 +1,12 @@
+diff -ur nagios-3.2.3.original/t-tap/test_events.c nagios-3.2.3/t-tap/test_events.c
+--- nagios-3.2.3.original/t-tap/test_events.c	2010-09-21 16:43:14.000000000 +0000
++++ nagios-3.2.3/t-tap/test_events.c	2010-11-10 08:36:08.000000000 +0000
+@@ -310,7 +310,7 @@
+ 	setup_events_with_host(now);
+ 	event_execution_loop();
+ 
+-	ok(host1->last_check == now,  "host1 was checked" );
++	ok(host1->last_check-now <= 2,  "host1 was checked (within 2 seconds tolerance)" ) || diag("last_check:%lu now:%lu", host1->last_check, now);
+ 	ok(svc3->last_check == 0, "svc3 was skipped" );
+ 	ok(host1->next_check == now,  "host1 rescheduled ahead - normal interval" );
+ 	ok(svc3->next_check == now+300, "svc3 rescheduled ahead - normal interval" );

_______________________________________________
Opsview-checkins mailing list
[email protected]
http://lists.opsview.org/lists/listinfo/opsview-checkins

Reply via email to