* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ztest.c,v 1.75 2005-06-25 15:46:09 adam Exp $
+ * $Id: ztest.c,v 1.76 2006-01-17 19:04:05 adam Exp $
*/
/*
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
#include <yaz/yaz-util.h>
#include <yaz/backend.h>
exit(0);
}
#endif
- /* Throw Database unavailable if other than Default */
- if (yaz_matchstr (rr->basenames[0], "Default"))
+ /* Throw Database unavailable if other than Default or Slow */
+ if (!yaz_matchstr (rr->basenames[0], "Default"))
+ ; /* Default is OK in our test */
+ else if(!yaz_matchstr (rr->basenames[0], "Slow"))
+ {
+#if HAVE_UNISTD_H
+ sleep(3);
+#endif
+ ;
+ }
+ else
{
rr->errcode = 109;
rr->errstring = rr->basenames[0];
int term_position_req = q->term_position;
int num_entries_req = q->num_entries;
- if (yaz_matchstr (q->basenames[0], "Default"))
+ /* Throw Database unavailable if other than Default or Slow */
+ if (!yaz_matchstr (q->basenames[0], "Default"))
+ ; /* Default is OK in our test */
+ else if(!yaz_matchstr (q->basenames[0], "Slow"))
+ {
+#if HAVE_UNISTD_H
+ sleep(3);
+#endif
+ ;
+ }
+ else
{
q->errcode = 109;
q->errstring = q->basenames[0];