com.rpl.rama.test

create-ipc

(create-ipc)(create-ipc custom-serialization-classes)

Create an InProcessCluster with an optional list of RamaCustomSerialization class references.

create-test-pstate

(create-test-pstate schema)

Creates an object compatible with local-transform> and local-select> based on the given schema for use in unit tests.

This object should be closed when no longer needed to clean up its resources.

destroy-module!

(destroy-module! ipc module-name)

Destroys a module.

gen-hashing-index-keys

(gen-hashing-index-keys num-tasks)(gen-hashing-index-keys prefix num-tasks)

Generates a key that hashes to each task in a range of tasks. The nth element in the returned list partitions to the nth task. This function is deterministic and will always produce the same keys. An optional prefix can be provided. Calling this function with different prefixes will produce unique keys.

launch-module!

(launch-module! ipc module config)

Launch a module. Blocks until module is running.

pause-microbatch-topology!

(pause-microbatch-topology! ipc module-name topology-name)

Pauses the specified microbatch topology so it stops processing. Blocks until the currently running microbatch finishes. No-op if topology is already paused.

resume-microbatch-topology!

(resume-microbatch-topology! ipc module-name topology-name)

Resumes a paused microbatch topology so it starts processing again. No-op if topology is already active.

test-pstate-select

(test-pstate-select *path *tp)

Selects from the test PState using the given path and returns results as a sequence.

test-pstate-select-one

(test-pstate-select-one path tp)

Selects a single value from the PState using the given path.

test-pstate-transform

(test-pstate-transform *path *tp)

Transforms the test PState with the given path.

update-module!

(update-module! ipc module)(update-module! ipc module options)

Update a module to a new version. Blocks until the update is complete. :objects-to-delete option must be specified if update is removing any depots or PStates.

Example:

(update-module! ipc my-new-module {:objects-to-delete ["$$p" "*depot2"]})

wait-for-microbatch-processed-count

(wait-for-microbatch-processed-count ipc module-name topology-name count)

Block until specified microbatch topology has finished processing at least the specified number of depot records since the topology started. If condition fails to be achieved within a timeout, an exception is thrown.