]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
Mon May 25 10:32:56 CDT 2009 Pekka Pessi <first.last@nokia.com>
authorMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 00:42:37 +0000 (00:42 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 10 Jul 2009 00:42:37 +0000 (00:42 +0000)
  * test_nta.c: use s2_fast_forward()

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14180 d0543943-73ff-0310-b7d9-9358b9ac24b2

libs/sofia-sip/.update
libs/sofia-sip/libsofia-sip-ua/nta/Makefile.am
libs/sofia-sip/libsofia-sip-ua/nta/test_nta.c

index dc050472d4c4783d4aea44b7624b2f37e235d3f7..511c70701604f45258a0964763159ef695266c58 100644 (file)
@@ -1 +1 @@
-Thu Jul  9 19:39:59 CDT 2009
+Thu Jul  9 19:40:57 CDT 2009
index ed708ee6ea1d290b485f9c81e6545268923df567..5665257b229f0587d17fd290d83fa255d7914d4f 100644 (file)
@@ -60,7 +60,8 @@ LDADD =               libnta.la \
                        ../url/liburl.la \
                        ../msg/libmsg.la \
                        ../bnf/libbnf.la \
-                       ../su/libsu.la
+                       ../su/libsu.la \
+                       ${top_builddir}/s2check/libs2.a
 
 test_nta_LDFLAGS =     -static
 
@@ -72,8 +73,7 @@ check_nta_SOURCES =   check_nta.c check_nta.h \
                        check_nta_api.c \
                        check_nta_client.c
 
-check_nta_LDADD =      ${LDADD} ${top_builddir}/s2check/libs2.a \
-                       @CHECK_LIBS@
+check_nta_LDADD =      ${LDADD} @CHECK_LIBS@
 
 else
 check_nta_SOURCES =    $(top_srcdir)/s2check/exit77.c
index 392b30913e4e045e76e3b85969e2ea5d39e4cbf3..d27709a5a7a4702712c589e6c11406d9f40ca5cb 100644 (file)
@@ -72,6 +72,8 @@ typedef struct client_t client_t;
 #include <assert.h>
 #include <unistd.h>
 
+#include "s2util.h"
+
 #if HAVE_OPEN_C
 #include <sys/param.h>
 #endif
@@ -500,6 +502,17 @@ void until_final_received(client_t *c)
   }
 }
 
+static
+void fast_final_received(client_t *c)
+{
+  for (c->c_final = 0; !c->c_final; ) {
+    if (tstflags & tst_verbatim) {
+      fputs(".", stdout); fflush(stdout);
+    }
+    s2_fast_forward(500, c->c_ag->ag_root);
+  }
+}
+
 static
 int client_run(client_t *c, int expected)
 {
@@ -1616,15 +1629,8 @@ int test_tports(agent_t *ag)
     url_t url[1];
     client_t ctx[1] = {{ ag, "Test 0.9" }};
 
-    printf("%s: starting MESSAGE timeout test, completing in 4 seconds\n",
-          name);
-
     nta_agent_set_params(ag->ag_agent,
                         NTATAG_TIMEOUT_408(1),
-                        NTATAG_SIP_T1(25),
-                        NTATAG_SIP_T1X64(64 * 25),
-                        NTATAG_SIP_T2(8 * 25),
-                        NTATAG_SIP_T4(10 * 25),
                         TAG_END());
 
     *url = *ag->ag_aliases->m_url;
@@ -1644,14 +1650,10 @@ int test_tports(agent_t *ag)
                           SIPTAG_CONTACT(ag->ag_m_bob),
                           TAG_END());
 
-    TEST_1(!client_run(ctx, 408));
+    TEST_1(!client_run_with(ctx, 408, fast_final_received));
     TEST_P(ag->ag_latest_leg, NULL);
 
     nta_agent_set_params(ag->ag_agent,
-                        NTATAG_SIP_T1(500),
-                        NTATAG_SIP_T1X64(64 * 500),
-                        NTATAG_SIP_T2(NTA_SIP_T2),
-                        NTATAG_SIP_T4(NTA_SIP_T4),
                         TAG_END());
   }
 
@@ -3958,6 +3960,9 @@ int main(int argc, char *argv[])
     retval |= test_prack(ag); SINGLE_FAILURE_CHECK();
     retval |= test_fix_467(ag); SINGLE_FAILURE_CHECK();
   }
+
+  s2_fast_forward(64000, ag->ag_root);
+
   retval |= test_deinit(ag); fflush(stdout);
 
   su_home_deinit(ag->ag_home);