~vjsamuel/gearmand/fix-bug-868883

« back to all changes in this revision

Viewing changes to tests/memcached_test.cc

  • Committer: Brian Aker
  • Date: 2011-06-29 20:30:46 UTC
  • mfrom: (440.1.11 gearmand-trunk)
  • Revision ID: brian@tangent.org-20110629203046-rtwa0eme3360be9i
Updating for release .23

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * the COPYING file in the parent directory for full text.
7
7
 */
8
8
 
9
 
#include "config.h"
10
 
 
11
 
#if defined(NDEBUG)
12
 
# undef NDEBUG
13
 
#endif
 
9
#include <libtest/common.h>
14
10
 
15
11
#include <cassert>
16
12
#include <cstdio>
20
16
 
21
17
#include <libgearman/gearman.h>
22
18
 
23
 
#include <libtest/test.h>
24
19
#include <libtest/server.h>
25
20
 
26
21
#include <tests/basic.h>
27
22
#include <tests/context.h>
28
23
 
29
 
#define WORKER_TEST_PORT 32123
 
24
#include <tests/ports.h>
30
25
 
31
26
void *world_create(test_return_t *error);
32
27
test_return_t world_destroy(void *object);
62
57
 
63
58
void *world_create(test_return_t *error)
64
59
{
65
 
  Context *test= new Context(WORKER_TEST_PORT);
 
60
  Context *test= new Context(MEMCACHED_TEST_PORT);
66
61
  if (not test)
67
62
  {
68
63
    *error= TEST_MEMORY_ALLOCATION_FAILURE;
100
95
  {0, 0, 0, 0}
101
96
};
102
97
 
103
 
void get_world(world_st *world)
 
98
void get_world(Framework *world)
104
99
{
105
100
  world->collections= collection;
106
 
  world->create= world_create;
107
 
  world->destroy= world_destroy;
 
101
  world->_create= world_create;
 
102
  world->_destroy= world_destroy;
108
103
}