summaryrefslogtreecommitdiff
path: root/tests/modules
Commit message (Collapse)AuthorAgeFilesLines
* fix race in module api test for forkOran Agra2020-02-231-1/+1
| | | | in some cases we were trying to kill the fork before it got created
* Fix memory leak in test_ld_convGuy Benoish2020-02-061-0/+4
|
* ld2string should fail if string contains \0 in the middleGuy Benoish2020-01-301-0/+9
| | | | | | | | | | | | | | | This bug affected RM_StringToLongDouble and HINCRBYFLOAT. I added tests for both cases. Main changes: 1. Fixed string2ld to fail if string contains \0 in the middle 2. Use string2ld in getLongDoubleFromObject - No point of having duplicated code here The two changes above broke RM_SaveLongDouble/RM_LoadLongDouble because the long double string was saved with length+1 (An innocent mistake, but it's actually a bug - The length passed to RM_SaveLongDouble should not include the last \0).
* Modules: Fix blocked-client-related memory leakGuy Benoish2019-12-301-6/+7
| | | | | | | | | | | If a blocked module client times-out (or disconnects, unblocked by CLIENT command, etc.) we need to call moduleUnblockClient in order to free memory allocated by the module sub-system and blocked-client private data Other changes: Made blockedonkeys.tcl tests a bit more aggressive in order to smoke-out potential memory leaks
* Fixed some documentationMadelyn Olson2019-12-171-32/+0
|
* Added some documentation and fixed a testMadelyn Olson2019-12-171-3/+7
|
* Add module APIs for custom authenticationMadelyn Olson2019-12-172-1/+120
|
* Improve RM_ModuleTypeReplaceValue() API.Yossi Gottlieb2019-12-121-0/+25
| | | | | | | | | | | With the previous API, a NULL return value was ambiguous and could represent either an old value of NULL or an error condition. The new API returns a status code and allows the old value to be returned by-reference. This commit also includes test coverage based on tests/modules/datatype.c which did not exist at the time of the original commit.
* fix crash in module short read testOran Agra2019-12-021-1/+2
|
* Merge branch 'unstable' into rm_get_server_infoSalvatore Sanfilippo2019-11-217-15/+949
|\
| * Merge branch 'unstable' into module-long-doubleSalvatore Sanfilippo2019-11-195-2/+393
| |\
| | * Merge pull request #6557 from oranagra/rm_lru_lfu_revizedSalvatore Sanfilippo2019-11-191-10/+56
| | |\ | | | | | | | | rename RN_SetLRUOrLFU -> RM_SetLRU and RN_SetLFU
| | | * rename RN_SetLRUOrLFU -> RM_SetLRU and RN_SetLFUOran Agra2019-11-101-10/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - the API name was odd, separated to two apis one for LRU and one for LFU - the LRU idle time was in 1 second resolution, which might be ok for RDB and RESTORE, but i think modules may need higher resolution - adding tests for LFU and for handling maxmemory policy mismatch
| | * | Merge pull request #6558 from oranagra/module_testrdb_leakSalvatore Sanfilippo2019-11-191-1/+4
| | |\ \ | | | | | | | | | | fix leak in module api rdb test
| | | * | fix leak in module api rdb testOran Agra2019-11-101-1/+4
| | | |/ | | | | | | | | | | | | | | | | | | | | recently added more reads into that function, if a later read fails, i must either free what's already allocated, or return the pointer so that the free callback will release it.
| | * | Merge branch 'unstable' into scan_module_implSalvatore Sanfilippo2019-11-192-1/+163
| | |\ \
| | | * | Add ModuleDataType to/from string serialization.Yossi Gottlieb2019-11-042-1/+163
| | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add two new functions that leverage the RedisModuleDataType mechanism for RDB serialization/deserialization and make it possible to use it to/from arbitrary strings: * RM_SaveDataTypeToString() * RM_LoadDataTypeFromString()
| | * | Add RM_ScanKey to scan hash, set, zset, changes to RM_Scan APIOran Agra2019-11-111-30/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adding RM_ScanKey - Adding tests for RM_ScanKey - Refactoring RM_Scan API Changes in RM_Scan - cleanup in docs and coding convention - Moving out of experimantal Api - Adding ctx to scan callback - Dont use cursor of -1 as an indication of done (can be a valid cursor) - Set errno when returning 0 for various reasons - Rename Cursor to ScanCursor - Test filters key that are not strings, and opens a key if NULL
| | * | Added scan implementation to module api.meir@redislabs.com2019-11-112-1/+64
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation expose the following new functions: 1. RedisModule_CursorCreate - allow to create a new cursor object for keys scanning 2. RedisModule_CursorRestart - restart an existing cursor to restart the scan 3. RedisModule_CursorDestroy - destroy an existing cursor 4. RedisModule_Scan - scan keys The RedisModule_Scan function gets a cursor object, a callback and void* (used as user private data). The callback will be called for each key in the database proving the key name and the value as RedisModuleKey.
| | * Merge pull request #6540 from oranagra/simple_module_api_testsSalvatore Sanfilippo2019-11-041-0/+69
| | |\ | | | | | | | | Test coverage for new module APIs: dbsize, flushall, randomkey, lru get/set
| | | * Test coverage for new module APIs: dbsize, flushall, randomkey, lru get/setOran Agra2019-11-041-0/+69
| | | |
| * | | RM_CreateStringFromLongDouble: use new ld2string 'mode' typeartix2019-11-041-0/+4
| | | |
| * | | Fix RedisModule_ReplyWithLongDouble ptr definition, add testsartix2019-11-041-1/+39
| |/ /
| * | Merge pull request #6531 from oranagra/rm_save_long_doubleSalvatore Sanfilippo2019-11-041-1/+8
| |\ \ | | |/ | |/| Module API for loading and saving long double
| | * Module API for loading and saving long doubleOran Agra2019-11-031-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | looks like each platform implements long double differently (different bit count) so we can't save them as binary, and we also want to avoid creating a new RDB format version, so we save these are hex strings using "%La". This commit includes a change in the arguments of ld2string to support this. as well as tests for coverage and short reads. coded by @guybe7
| * | Merge pull request #6535 from guybe7/module_block_on_keys_testsSalvatore Sanfilippo2019-11-042-1/+263
| |\ \ | | | | | | | | Modules: Test RedisModule_BlockClientOnKeys
| | * | Modules: Test RedisModule_BlockClientOnKeysGuy Benoish2019-11-042-1/+263
| | |/
| * | Modules hooks: complete missing hooks for the initial set of hooksOran Agra2019-10-291-12/+244
| |/ | | | | | | | | | | | | | | | | | | | | * replication hooks: role change, master link status, replica online/offline * persistence hooks: saving, loading, loading progress * misc hooks: cron loop, shutdown, module loaded/unloaded * change the way hooks test work, and add tests for all of the above startLoading() now gets flag indicating what is loaded. stopLoading() now gets an indication of success or failure. adding startSaving() and stopSaving() with similar args and role.
* | Add RM_ServerInfoGetFieldUnsignedOran Agra2019-11-041-1/+12
| | | | | | | | | | | | rename RM_ServerInfoGetFieldNumerical RM_ServerInfoGetFieldSigned move string2ull to util.c fix leak in RM_GetServerInfo when duplicate info fields exist
* | Adding RM_ServerInfoGetFieldCOran Agra2019-11-041-2/+12
| |
* | Add module api for looking into INFO fieldsOran Agra2019-11-031-0/+52
|/ | | | | | | | | | | | | - Add RM_GetServerInfo and friends - Add auto memory for new opaque struct - Add tests for new APIs other minor fixes: - add const in various char pointers - requested_section in modulesCollectInfo was actually not sds but char* - extract new string2d out of getDoubleFromObject for code reuse Add module API for
* Module api tests for RM_CallOran Agra2019-10-283-1/+61
| | | | | | | Adding a test for coverage for RM_Call in a new "misc" unit to be used for various short simple tests also solves compilation warnings in redismodule.h and fork.c
* Merge pull request #6496 from oranagra/module_tests_valgrindSalvatore Sanfilippo2019-10-282-0/+13
|\ | | | | Make module tests pass with valgrind, and fix a leak in diskless load
| * Make module tests pass with valgrind, and fix a leak in diskless loadOran Agra2019-10-242-0/+13
| |
* | Modules: improve tests Makefile.Yossi Gottlieb2019-10-241-24/+15
| | | | | | | | Removes some boilerplate per module, add clean target.
* | Modules hooks: test flush event.antirez2019-10-241-0/+2
| |
* | Modules hooks: test module draft.antirez2019-10-232-1/+82
|/
* Modules: add RM_Replicate() Tcl test file & fix the module.antirez2019-10-031-0/+1
|
* Modules: RM_Replicate() test with threads.antirez2019-10-031-2/+23
|
* Modules: RM_Replicate() test module: initial implementation.antirez2019-10-032-1/+86
|
* Merge remote-tracking branch 'antirez/unstable' into modules_infoOran Agra2019-09-303-1/+333
|\
| * Merge branch 'unstable' into modules_forkSalvatore Sanfilippo2019-09-272-1/+245
| |\
| | * Add test for module diskless short readsOran Agra2019-07-301-1/+12
| | |
| | * Implement module api for aux data in rdbOran Agra2019-07-222-1/+234
| | | | | | | | | | | | | | | Other changes: * fix memory leak in error handling of rdb loading of type OBJ_MODULE
| * | Module API for ForkingOran Agra2019-07-172-1/+89
| |/ | | | | | | | | | | | | | | | | | | | | * create module API for forking child processes. * refactor duplicate code around creating and tracking forks by AOF and RDB. * child processes listen to SIGUSR1 and dies exitFromChild in order to eliminate a valgrind warning of unhandled signal. * note that BGSAVE error reply has changed. valgrind error is: Process terminating with default action of signal 10 (SIGUSR1)
* | Module INFO, support default section for simple modulesOran Agra2019-08-181-0/+3
| |
* | Module INFO, add support for dict fields, rename API to have common prefixOran Agra2019-08-181-10/+16
| |
* | Extend modules API to allow modules report to redis INFOOran Agra2019-07-242-1/+38
|/ | | | this implements #6012
* Add runtest-moduleapi with commandfilter coverage.Yossi Gottlieb2019-03-242-14/+38
|
* fix: missing initialization.Yossi Gottlieb2019-03-242-84/+149
|