diff options
| author | Travis Reitter <treitter@gmail.com> | 2009-12-28 17:16:09 -0800 |
|---|---|---|
| committer | Travis Reitter <treitter@gmail.com> | 2009-12-28 17:16:09 -0800 |
| commit | fbbef1e7240dba046eda5ef0bf8e236ce8ed1bc6 (patch) | |
| tree | 66186310f2414f91d15530554aaf02fd82c321f4 /addressbook/tests/ebook/test-ebook-stress-factory--fifo.c | |
| parent | d0fc2bd9c6ac9fc2407b4deedfe2698958802734 (diff) | |
| download | evolution-data-server-treitter-client-gdbus.tar.gz | |
Add tests to stress-test the addressbook factory.treitter-client-gdbus
Diffstat (limited to 'addressbook/tests/ebook/test-ebook-stress-factory--fifo.c')
| -rw-r--r-- | addressbook/tests/ebook/test-ebook-stress-factory--fifo.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/addressbook/tests/ebook/test-ebook-stress-factory--fifo.c b/addressbook/tests/ebook/test-ebook-stress-factory--fifo.c new file mode 100644 index 000000000..cf8e03e47 --- /dev/null +++ b/addressbook/tests/ebook/test-ebook-stress-factory--fifo.c @@ -0,0 +1,33 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ + +#include <stdlib.h> +#include <libebook/e-book.h> + +#include "ebook-test-utils.h" + +#define NUM_BOOKS 200 + +gint +main (gint argc, gchar **argv) +{ + char *uri = NULL; + EBook *books[NUM_BOOKS]; + gint i; + + g_type_init (); + + /* Create and open many books; then remove each of them */ + + for (i = 0; i < NUM_BOOKS; i++) { + books[i] = ebook_test_utils_book_new_temp (&uri); + ebook_test_utils_book_open (books[i], FALSE); + + g_free (uri); + } + + for (i = 0; i < NUM_BOOKS; i++) { + ebook_test_utils_book_remove (books[i]); + } + + return 0; +} |
