Skip to content

Commit

Permalink
Fixed old tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Mast committed Feb 20, 2015
2 parents 8cba12e + 499c27a commit 3adc314
Show file tree
Hide file tree
Showing 54 changed files with 2,720 additions and 1,790 deletions.
8 changes: 4 additions & 4 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -969,10 +969,6 @@ if ENABLE_CLIENT
if ENABLE_PYTHON_BINDINGS
TESTS += $(doctest_wrappers)

if ENABLE_TIME_CONSUMING_TESTS
TESTS += $(stress_wrappers)
endif

TESTS += $(python_wrappers)
check_PROGRAMS += bindings/python/hyperdex/admin.so
check_PROGRAMS += bindings/python/hyperdex/client.so
Expand All @@ -985,6 +981,10 @@ if ENABLE_RUBY_BINDINGS
TESTS += $(ruby_wrappers)
endif

if ENABLE_TIME_CONSUMING_TESTS
TESTS += $(stress_wrappers)
endif

endif # ENABLE_PYTHON_BINDINGS
endif # ENABLE_CLIENT
endif # ENABLE_ADMIN
Expand Down
1 change: 1 addition & 0 deletions bindings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def __init__(self, name, form, args_in, args_out):
Method('put', AsyncCall, (SpaceName, Key, Attributes), (Status,)),
Method('uxact_put', MicrotransactionCall, (Microtransaction, Attributes), ()),
Method('cond_put', AsyncCall, (SpaceName, Key, Predicates, Attributes), (Status,)),
Method('cond_put_or_create', AsyncCall, (SpaceName, Key, Predicates, Attributes), (Status,)),
Method('group_put', AsyncCall, (SpaceName, Predicates, Attributes), (Status, Count)),
Method('put_if_not_exist', AsyncCall, (SpaceName, Key, Attributes), (Status,)),
Method('del', AsyncCall, (SpaceName, Key), (Status,)),
Expand Down
7 changes: 7 additions & 0 deletions bindings/c.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,6 +795,13 @@ def generate_admin_doc():
);
}
HYPERDEX_API void
hyperdex_client_set_type_conversion(hyperdex_client* _cl, bool enabled)
{
hyperdex::client* cl = reinterpret_cast<hyperdex::client*>(_cl);
cl->set_type_conversion(enabled);
}
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
Expand Down
7 changes: 7 additions & 0 deletions bindings/go/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1896,6 +1896,13 @@ func (client *Client) CondPut(spacename string, key Value, predicates []Predicat
return client.AsynccallSpacenameKeyPredicatesAttributesStatus(stub_cond_put, spacename, key, predicates, attributes)
}

func stub_cond_put_or_create(client *C.struct_hyperdex_client, space *C.char, key *C.char, key_sz C.size_t, checks *C.struct_hyperdex_client_attribute_check, checks_sz C.size_t, attrs *C.struct_hyperdex_client_attribute, attrs_sz C.size_t, status *C.enum_hyperdex_client_returncode) int64 {
return int64(C.hyperdex_client_cond_put_or_create(client, space, key, key_sz, checks, checks_sz, attrs, attrs_sz, status))
}
func (client *Client) CondPutOrCreate(spacename string, key Value, predicates []Predicate, attributes Attributes) (err *Error) {
return client.AsynccallSpacenameKeyPredicatesAttributesStatus(stub_cond_put_or_create, spacename, key, predicates, attributes)
}

func stub_group_put(client *C.struct_hyperdex_client, space *C.char, checks *C.struct_hyperdex_client_attribute_check, checks_sz C.size_t, attrs *C.struct_hyperdex_client_attribute, attrs_sz C.size_t, status *C.enum_hyperdex_client_returncode, count *C.uint64_t) int64 {
return int64(C.hyperdex_client_group_put(client, space, checks, checks_sz, attrs, attrs_sz, status, count))
}
Expand Down
11 changes: 6 additions & 5 deletions bindings/java.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,27 @@ def JTYPEOF(x):
return 'List<String>'
elif x == bindings.Predicates:
return 'Map<String, Object>'
elif x in (bindings.Key, bindings.SpaceName, bindings.SortBy):
elif x in (bindings.SpaceName, bindings.SortBy):
return 'String'
elif x in (bindings.Limit, bindings.Count):
return 'int'
elif x == bindings.MaxMin:
return 'boolean'
elif x == bindings.Microtransaction:
return 'Microtransaction'
elif x in (bindings.Status, bindings.Description):
elif x in (bindings.Status, bindings.Key, bindings.Description):
return 'Object'
else:
raise RuntimeError('Unknown type: ' + str(x))

def CTYPEOF(x):
if x in (bindings.SpaceName, bindings.Key, bindings.SortBy):
if x in (bindings.SpaceName, bindings.SortBy):
return 'jstring'
elif x == bindings.Limit:
return 'jint'
elif x == bindings.MaxMin:
return 'jboolean'
elif x in (bindings.AttributeNames, bindings.Attributes, bindings.MapAttributes,
elif x in (bindings.AttributeNames, bindings.Key, bindings.Attributes, bindings.MapAttributes,
bindings.Predicates, bindings.Status, bindings.Description, bindings.Microtransaction):
return 'jobject'
else:
Expand Down Expand Up @@ -142,6 +142,7 @@ def generate_worker(call, x):
func += ' ERROR_CHECK(0);\n'
func += ' return op;\n'
func += '}\n'

return func

def generate_workers(xs):
Expand All @@ -151,7 +152,7 @@ def generate_workers(xs):
if call in calls:
continue
if x.form is bindings.MicrotransactionCall:
return
continue
yield generate_worker(call, x)
calls.add(call)

Expand Down
Loading

0 comments on commit 3adc314

Please sign in to comment.