summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-18 19:31:12 +0300
committerEvgeny Khramtsov <ekhramtsov@process-one.net>2019-07-18 19:31:12 +0300
commit3f7d9e3ad6e63b43da5670090c8f72329f536f3e (patch)
treed3dec9ca0814ce4ebb36e234fbfc25b9b3f72470 /test
parentMention about a few Riak tests being broken (diff)
Remove Riak support
Reasons: - Riak DB development is almost halted after Basho - riak-erlang-client is abandoned and doesn't work correctly with OTP22 - Riak is slow in comparison to other databases - Missing key ordering makes it impossible to implement range queries efficiently (e.g. MAM queries)
Diffstat (limited to 'test')
-rw-r--r--test/README29
-rw-r--r--test/docker/README.md14
-rw-r--r--test/docker/db/riak/Dockerfile53
-rw-r--r--test/docker/db/riak/advanced.config27
-rw-r--r--test/docker/db/riak/ejabberd_riak.beambin11204 -> 0 bytes
-rwxr-xr-xtest/docker/db/riak/prestart.d/00-setup-networking.sh9
-rw-r--r--test/docker/db/riak/riak-cluster.sh56
-rw-r--r--test/docker/db/riak/riak.conf682
-rw-r--r--test/docker/docker-compose.yml11
-rw-r--r--test/ejabberd_SUITE.erl55
-rw-r--r--test/ejabberd_SUITE_data/ejabberd.riak.yml44
-rw-r--r--test/ejabberd_SUITE_data/ejabberd.yml3
-rw-r--r--test/offline_tests.erl11
-rw-r--r--test/suite.erl4
-rw-r--r--test/suite.hrl3
15 files changed, 10 insertions, 991 deletions
diff --git a/test/README b/test/README
index 493bff34..8857cde9 100644
--- a/test/README
+++ b/test/README
@@ -1,12 +1,9 @@
-You need MySQL, PostgreSQL, Redis and Riak up and running.
+You need MySQL, PostgreSQL and Redis up and running.
MySQL should be accepting TCP connections on localhost:3306.
PostgreSQL should be accepting TCP connections on localhost:5432.
Redis should be accepting TCP connections on localhost:6379.
-Riak should be accepting TCP connections on localhost:8087.
MySQL and PostgreSQL should grant full access to user 'ejabberd_test' with
password 'ejabberd_test' on database 'ejabberd_test'.
-Riak should be configured with leveldb as a database backend and -pz
-should be pointed to the directory with ejabberd BEAM files.
Here is a quick setup example:
@@ -25,27 +22,3 @@ $ mysql
mysql> CREATE USER 'ejabberd_test'@'localhost' IDENTIFIED BY 'ejabberd_test';
mysql> CREATE DATABASE ejabberd_test;
mysql> GRANT ALL ON ejabberd_test.* TO 'ejabberd_test'@'localhost';
-
--------------------
- Riak
--------------------
-$ cat /etc/riak/vm.args
-...
-## Map/Reduce path
--pz /path/to/ejabberd/ebin
-...
-
-For version < 2.x:
-
-$ cat /etc/riak/app.config:
-...
- {riak_kv, [
- {storage_backend, riak_kv_eleveldb_backend},
-...
-
-For version >= 2.x:
-
-$ cat /etc/riak/riak.conf:
-...
-storage_backend = leveldb
-...
diff --git a/test/docker/README.md b/test/docker/README.md
index c0abd607..22324a6e 100644
--- a/test/docker/README.md
+++ b/test/docker/README.md
@@ -4,13 +4,12 @@
You can start the Docker environment with Docker Compose, from ejabberd repository root.
-The following command will launch MySQL, PostgreSQL, Redis and Riak, and keep the console
+The following command will launch MySQL, PostgreSQL, Redis and keep the console
attached to it.
```
mkdir test/docker/db/mysql/data
mkdir test/docker/db/postgres/data
-mkdir test/docker/db/riak/data
(cd test/docker; docker-compose up)
```
@@ -18,7 +17,7 @@ You can stop all the databases with CTRL-C.
## Running tests
-Before running the test, you can ensure there is no running instance of Erlang common test tool. You can run the following
+Before running the test, you can ensure there is no running instance of Erlang common test tool. You can run the following
command, especially if all test are skipped with an `eaddrinuse` error:
```
@@ -31,14 +30,6 @@ You can run tests with (from ejabberd repository root):
make test
```
-At the moment, starting from Erlang 21, some Riak tests are broken because Riak client is not compliant with OTP 21+.
-
-To run everything except Riak tests, you can use the following command:
-
-```
-CT_BACKENDS=mnesia,redis,mysql,pgsql,sqlite,ldap,extauth rebar ct suites=ejabberd
-```
-
## Cleaning up the test environment
You can fully clean up the environment with:
@@ -52,5 +43,4 @@ If you want to clean the data, you can remove the data directories after the `do
```
rm -rf test/docker/db/mysql/data
rm -rf test/docker/db/postgres/data
-rm -rf test/docker/db/riak/data
```
diff --git a/test/docker/db/riak/Dockerfile b/test/docker/db/riak/Dockerfile
deleted file mode 100644
index b0f539dc..00000000
--- a/test/docker/db/riak/Dockerfile
+++ /dev/null
@@ -1,53 +0,0 @@
-# docker build -t ejabberd/riak .
-# docker run --rm -it -p 8087:8087 -p 8098:8098 -v "`pwd`/ebin:/usr/lib/ejabberd/ebin" --name ejabberd-riak ejabberd/riak
-# docker exec -it ejabberd-riak /bin/bash
-# docker push ejabberd/riak:latest
-FROM ubuntu:16.04
-
-ENV DEBIAN_FRONTEND noninteractive
-# ENV RIAK_VERSION 2.0.9-1
-# install riak=${RIAK_VERSION} to fallback to an older version
-
-RUN \
- apt-get update -qq && \
- apt-get install -y curl apt-utils iputils-ping && \
- curl -s https://packagecloud.io/install/repositories/basho/riak/script.deb.sh | bash && \
- apt-get install -y riak && \
- apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
-
-# Expose default ports
-EXPOSE 8087
-EXPOSE 8098
-
-# Expose volumes for data and logs
-VOLUME /var/log/riak
-VOLUME /var/lib/riak
-
-# Expose volumes for ejabberd code for map/reduce in Riak.
-# It can be overloaded to provide a new ejabberd_riak.beam file.
-# Note that ejabberd_riak.beam needs to be compiled with Erlang/OTP R16
-# as this is the version of Erlang Basho has packaged with Riak.
-COPY ejabberd_riak.beam /usr/lib/ejabberd/ebin/ejabberd_riak.beam
-VOLUME /usr/lib/ejabberd/ebin
-
-# Install custom start script
-COPY riak-cluster.sh /sbin/riak-cluster.sh
-RUN chmod a+x /sbin/riak-cluster.sh
-
-# Change configuration to make it work with ejabberd
-COPY advanced.config /etc/riak/advanced.config
-COPY riak.conf /etc/riak/riak.conf
-
-# Install custom hooks
-COPY prestart.d /etc/riak/prestart.d
-# COPY poststart.d /etc/riak/poststart.d
-
-# Prepare for bootstrapping schemas
-RUN mkdir -p /etc/riak/schemas
-
-# Clean up APT cache
-RUN rm -rf /var/lib/apt/lists/* /tmp/*
-
-WORKDIR /var/lib/riak
-
-CMD ["/sbin/riak-cluster.sh"]
diff --git a/test/docker/db/riak/advanced.config b/test/docker/db/riak/advanced.config
deleted file mode 100644
index e5d5f874..00000000
--- a/test/docker/db/riak/advanced.config
+++ /dev/null
@@ -1,27 +0,0 @@
-%% Config file used to set advanced configuration options
-
-[{lager,
- [
- {extra_sinks,
- [
- {object_lager_event,
- [{handlers,
- [{lager_file_backend,
- [{file, "/var/log/riak/object.log"},
- {level, info},
- {formatter_config, [date, " ", time," [",severity,"] ",message, "\n"]}
- ]
- }]
- },
- {async_threshold, 500},
- {async_threshold_window, 50}]
- }
- ]
- }
- ]},
-
- {riak_kv, [
- %% Other configs
- {add_paths, ["/usr/lib/ejabberd/ebin"]}
- ]}
-].
diff --git a/test/docker/db/riak/ejabberd_riak.beam b/test/docker/db/riak/ejabberd_riak.beam
deleted file mode 100644
index 3bebb297..00000000
--- a/test/docker/db/riak/ejabberd_riak.beam
+++ /dev/null
Binary files differ
diff --git a/test/docker/db/riak/prestart.d/00-setup-networking.sh b/test/docker/db/riak/prestart.d/00-setup-networking.sh
deleted file mode 100755
index 07ca617f..00000000
--- a/test/docker/db/riak/prestart.d/00-setup-networking.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-# Add standard config items
-cat <<END >>$RIAK_CONF
-nodename = riak@$HOST
-distributed_cookie = $CLUSTER_NAME
-listener.protobuf.internal = $HOST:$PB_PORT
-listener.http.internal = $HOST:$HTTP_PORT
-END
diff --git a/test/docker/db/riak/riak-cluster.sh b/test/docker/db/riak/riak-cluster.sh
deleted file mode 100644
index 11f344f0..00000000
--- a/test/docker/db/riak/riak-cluster.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/bash
-#
-# Cluster start script to bootstrap a Riak cluster.
-#
-set -ex
-
-if [[ -x /usr/sbin/riak ]]; then
- export RIAK=/usr/sbin/riak
-else
- export RIAK=$RIAK_HOME/bin/riak
-fi
-export RIAK_CONF=/etc/riak/riak.conf
-export USER_CONF=/etc/riak/user.conf
-export RIAK_ADVANCED_CONF=/etc/riak/advanced.config
-if [[ -x /usr/sbin/riak-admin ]]; then
- export RIAK_ADMIN=/usr/sbin/riak-admin
-else
- export RIAK_ADMIN=$RIAK_HOME/bin/riak-admin
-fi
-export SCHEMAS_DIR=/etc/riak/schemas/
-
-# Set ports for PB and HTTP
-export PB_PORT=${PB_PORT:-8087}
-export HTTP_PORT=${HTTP_PORT:-8098}
-
-# Use ping to discover our HOSTNAME because it's easier and more reliable than other methods
-export HOST=$(ping -c1 $HOSTNAME | awk '/^PING/ {print $3}' | sed 's/[()]//g')||'127.0.0.1'
-
-# CLUSTER_NAME is used to name the nodes and is the value used in the distributed cookie
-export CLUSTER_NAME=${CLUSTER_NAME:-riak}
-
-# The COORDINATOR_NODE is the first node in a cluster to which other nodes will eventually join
-export COORDINATOR_NODE=${COORDINATOR_NODE:-$HOSTNAME}
-export COORDINATOR_NODE_HOST=$(ping -c1 $COORDINATOR_NODE | awk '/^PING/ {print $3}' | sed 's/[()]//g')||'127.0.0.1'
-
-# Run all prestart scripts
-PRESTART=$(find /etc/riak/prestart.d -name *.sh -print | sort)
-for s in $PRESTART; do
- . $s
-done
-
-# Start the node and wait until fully up
-$RIAK start
-$RIAK_ADMIN wait-for-service riak_kv
-
-# Run all poststart scripts
-POSTSTART=$(find /etc/riak/poststart.d -name *.sh -print | sort)
-for s in $POSTSTART; do
- . $s
-done
-
-# Trap SIGTERM and SIGINT and tail the log file indefinitely
-tail -n 1024 -f /var/log/riak/console.log &
-PID=$!
-trap "$RIAK stop; kill $PID" SIGTERM SIGINT
-wait $PID
diff --git a/test/docker/db/riak/riak.conf b/test/docker/db/riak/riak.conf
deleted file mode 100644
index 3c8c0c09..00000000
--- a/test/docker/db/riak/riak.conf
+++ /dev/null
@@ -1,682 +0,0 @@
-## Where to emit the default log messages (typically at 'info'
-## severity):
-## off: disabled
-## file: the file specified by log.console.file
-## console: to standard output (seen when using `riak attach-direct`)
-## both: log.console.file and standard out.
-##
-## Default: file
-##
-## Acceptable values:
-## - one of: off, file, console, both
-log.console = file
-
-## The severity level of the console log, default is 'info'.
-##
-## Default: info
-##
-## Acceptable values:
-## - one of: debug, info, notice, warning, error, critical, alert, emergency, none
-log.console.level = info
-
-## When 'log.console' is set to 'file' or 'both', the file where
-## console messages will be logged.
-##
-## Default: $(platform_log_dir)/console.log
-##
-## Acceptable values:
-## - the path to a file
-log.console.file = $(platform_log_dir)/console.log
-
-## The file where error messages will be logged.
-##
-## Default: $(platform_log_dir)/error.log
-##
-## Acceptable values:
-## - the path to a file
-log.error.file = $(platform_log_dir)/error.log
-
-## When set to 'on', enables log output to syslog.
-##
-## Default: off
-##
-## Acceptable values:
-## - on or off
-log.syslog = off
-
-## Whether to enable the crash log.
-##
-## Default: on
-##
-## Acceptable values:
-## - on or off
-log.crash = on
-
-## If the crash log is enabled, the file where its messages will
-## be written.
-##
-## Default: $(platform_log_dir)/crash.log
-##
-## Acceptable values:
-## - the path to a file
-log.crash.file = $(platform_log_dir)/crash.log
-
-## Maximum size in bytes of individual messages in the crash log
-##
-## Default: 64KB
-##
-## Acceptable values:
-## - a byte size with units, e.g. 10GB
-log.crash.maximum_message_size = 64KB
-
-## Maximum size of the crash log in bytes, before it is rotated
-##
-## Default: 10MB
-##
-## Acceptable values:
-## - a byte size with units, e.g. 10GB
-log.crash.size = 10MB
-
-## The schedule on which to rotate the crash log. For more
-## information see:
-## https://github.com/basho/lager/blob/master/README.md#internal-log-rotation
-##
-## Default: $D0
-##
-## Acceptable values:
-## - text
-log.crash.rotation = $D0
-
-## The number of rotated crash logs to keep. When set to
-## 'current', only the current open log file is kept.
-##
-## Default: 5
-##
-## Acceptable values:
-## - an integer
-## - the text "current"
-log.crash.rotation.keep = 5
-
-## Name of the Erlang node
-##
-## Default: riak@127.0.0.1
-##
-## Acceptable values:
-## - text
-## nodename = riak@127.0.0.1
-
-## Cookie for distributed node communication. All nodes in the
-## same cluster should use the same cookie or they will not be able to
-## communicate.
-##
-## Default: riak
-##
-## Acceptable values:
-## - text
-distributed_cookie = riak
-
-## Sets the number of threads in async thread pool, valid range
-## is 0-1024. If thread support is available, the default is 64.
-## More information at: http://erlang.org/doc/man/erl.html
-##
-## Default: 64
-##
-## Acceptable values:
-## - an integer
-erlang.async_threads = 64
-
-## The number of concurrent ports/sockets
-## Valid range is 1024-134217727
-##
-## Default: 262144
-##
-## Acceptable values:
-## - an integer
-erlang.max_ports = 262144
-
-## Set scheduler forced wakeup interval. All run queues will be
-## scanned each Interval milliseconds. While there are sleeping
-## schedulers in the system, one scheduler will be woken for each
-## non-empty run queue found. An Interval of zero disables this
-## feature, which also is the default.
-## This feature is a workaround for lengthy executing native code, and
-## native code that do not bump reductions properly.
-## More information: http://www.erlang.org/doc/man/erl.html#+sfwi
-##
-## Default: 500
-##
-## Acceptable values:
-## - an integer
-## erlang.schedulers.force_wakeup_interval = 500
-
-## Enable or disable scheduler compaction of load. By default
-## scheduler compaction of load is enabled. When enabled, load
-## balancing will strive for a load distribution which causes as many
-## scheduler threads as possible to be fully loaded (i.e., not run out
-## of work). This is accomplished by migrating load (e.g. runnable
-## processes) into a smaller set of schedulers when schedulers
-## frequently run out of work. When disabled, the frequency with which
-## schedulers run out of work will not be taken into account by the
-## load balancing logic.
-## More information: http://www.erlang.org/doc/man/erl.html#+scl
-##
-## Default: false
-##
-## Acceptable values:
-## - one of: true, false
-## erlang.schedulers.compaction_of_load = false
-
-## Enable or disable scheduler utilization balancing of load. By
-## default scheduler utilization balancing is disabled and instead
-## scheduler compaction of load is enabled which will strive for a
-## load distribution which causes as many scheduler threads as
-## possible to be fully loaded (i.e., not run out of work). When
-## scheduler utilization balancing is enabled the system will instead
-## try to balance scheduler utilization between schedulers. That is,
-## strive for equal scheduler utilization on all schedulers.
-## More information: http://www.erlang.org/doc/man/erl.html#+sub
-##
-## Acceptable values:
-## - one of: true, false
-## erlang.schedulers.utilization_balancing = true
-
-## Number of partitions in the cluster (only valid when first
-## creating the cluster). Must be a power of 2, minimum 8 and maximum
-## 1024.
-##
-## Default: 64
-##
-## Acceptable values:
-## - an integer
-## ring_size = 64
-
-## Number of concurrent node-to-node transfers allowed.
-##
-## Default: 2
-##
-## Acceptable values:
-## - an integer
-## transfer_limit = 2
-
-## Default cert location for https can be overridden
-## with the ssl config variable, for example:
-##
-## Acceptable values:
-## - the path to a file
-## ssl.certfile = $(platform_etc_dir)/cert.pem
-
-## Default key location for https can be overridden with the ssl
-## config variable, for example:
-##
-## Acceptable values:
-## - the path to a file
-## ssl.keyfile = $(platform_etc_dir)/key.pem
-
-## Default signing authority location for https can be overridden
-## with the ssl config variable, for example:
-##
-## Acceptable values:
-## - the path to a file
-## ssl.cacertfile = $(platform_etc_dir)/cacertfile.pem
-
-## DTrace support Do not enable 'dtrace' unless your Erlang/OTP
-## runtime is compiled to support DTrace. DTrace is available in
-## R15B01 (supported by the Erlang/OTP official source package) and in
-## R14B04 via a custom source repository & branch.
-##
-## Default: off
-##
-## Acceptable values:
-## - on or off
-dtrace = off
-
-## Platform-specific installation paths (substituted by rebar)
-##
-## Default: /usr/sbin
-##
-## Acceptable values:
-## - the path to a directory
-platform_bin_dir = /usr/sbin
-
-##
-## Default: /var/lib/riak
-##
-## Acceptable values:
-## - the path to a directory
-platform_data_dir = /var/lib/riak
-
-##
-## Default: /etc/riak
-##
-## Acceptable values:
-## - the path to a directory
-platform_etc_dir = /etc/riak
-
-##
-## Default: /usr/lib/riak/lib
-##
-## Acceptable values:
-## - the path to a directory
-platform_lib_dir = /usr/lib/riak/lib
-
-##
-## Default: /var/log/riak
-##
-## Acceptable values:
-## - the path to a directory
-platform_log_dir = /var/log/riak
-
-## Enable consensus subsystem. Set to 'on' to enable the
-## consensus subsystem used for strongly consistent Riak operations.
-##
-## Default: off
-##
-## Acceptable values:
-## - on or off
-## strong_consistency = on
-
-## listener.http.<name> is an IP address and TCP port that the Riak
-## HTTP interface will bind.
-##
-## Default: 127.0.0.1:8098
-##
-## Acceptable values:
-## - an IP/port pair, e.g. 127.0.0.1:10011
-## listener.http.internal = 127.0.0.1:8098
-
-## listener.protobuf.<name> is an IP address and TCP port that the Riak
-## Protocol Buffers interface will bind.
-##
-## Default: 127.0.0.1:8087
-##
-## Acceptable values:
-## - an IP/port pair, e.g. 127.0.0.1:10011
-## listener.protobuf.internal = 127.0.0.1:8087
-
-## The maximum length to which the queue of pending connections
-## may grow. If set, it must be an integer > 0. If you anticipate a
-## huge number of connections being initialized *simultaneously*, set
-## this number higher.
-##
-## Default: 128
-##
-## Acceptable values:
-## - an integer
-## protobuf.backlog = 128
-
-## listener.https.<name> is an IP address and TCP port that the Riak
-## HTTPS interface will bind.
-##
-## Acceptable values:
-## - an IP/port pair, e.g. 127.0.0.1:10011
-## listener.https.internal = 127.0.0.1:8098
-
-## How Riak will repair out-of-sync keys. Some features require
-## this to be set to 'active', including search.
-## * active: out-of-sync keys will be repaired in the background
-## * passive: out-of-sync keys are only repaired on read
-## * active-debug: like active, but outputs verbose debugging
-## information
-##
-## Default: active
-##
-## Acceptable values:
-## - one of: active, passive, active-debug
-anti_entropy = active
-
-## Specifies the storage engine used for Riak's key-value data
-## and secondary indexes (if supported).
-##
-## Default: bitcask
-##
-## Acceptable values:
-## - one of: bitcask, leveldb, memory, multi, prefix_multi
-storage_backend = leveldb
-
-## Simplify prefix_multi configuration for Riak CS. Keep this
-## commented out unless Riak is configured for Riak CS.
-##
-## Acceptable values:
-## - an integer
-## cs_version = 20000
-
-## Controls which binary representation of a riak value is stored
-## on disk.
-## * 0: Original erlang:term_to_binary format. Higher space overhead.
-## * 1: New format for more compact storage of small values.
-##
-## Default: 1
-##
-## Acceptable values:
-## - the integer 1
-## - the integer 0
-object.format = 1
-
-## Reading or writing objects bigger than this size will write a
-## warning in the logs.
-##
-## Default: 5MB
-##
-## Acceptable values:
-## - a byte size with units, e.g. 10GB
-object.size.warning_threshold = 5MB
-
-## Writing an object bigger than this will send a failure to the
-## client.
-##
-## Default: 50MB
-##
-## Acceptable values:
-## - a byte size with units, e.g. 10GB
-object.size.maximum = 50MB
-
-## Writing an object with more than this number of siblings will
-## generate a warning in the logs.
-##
-## Default: 25
-##
-## Acceptable values:
-## - an integer
-object.siblings.warning_threshold = 25
-
-## Writing an object with more than this number of siblings will
-## send a failure to the client.
-##
-## Default: 100
-##
-## Acceptable values:
-## - an integer
-object.siblings.maximum = 100
-
-## Whether to allow list buckets.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.list_buckets = enabled
-
-## Whether to allow streaming list buckets.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.stream_list_buckets = enabled
-
-## Whether to allow list keys.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.list_keys = enabled
-
-## Whether to allow streaming list keys.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.stream_list_keys = enabled
-
-## Whether to allow secondary index queries.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.secondary_index = enabled
-
-## Whether to allow streaming secondary index queries.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.stream_secondary_index = enabled
-
-## Whether to allow term-based map-reduce.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.map_reduce = enabled
-
-## Whether to allow JavaScript map-reduce.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_kv.map_reduce_js = enabled
-
-## A path under which bitcask data files will be stored.
-##
-## Default: $(platform_data_dir)/bitcask
-##
-## Acceptable values:
-## - the path to a directory
-bitcask.data_root = $(platform_data_dir)/bitcask
-
-## Configure how Bitcask writes data to disk.
-## erlang: Erlang's built-in file API
-## nif: Direct calls to the POSIX C API
-## The NIF mode provides higher throughput for certain
-## workloads, but has the potential to negatively impact
-## the Erlang VM, leading to higher worst-case latencies
-## and possible throughput collapse.
-##
-## Default: erlang
-##
-## Acceptable values:
-## - one of: erlang, nif
-bitcask.io_mode = erlang
-
-## Set to 'off' to disable the admin panel.
-##
-## Default: off
-##
-## Acceptable values:
-## - on or off
-riak_control = off
-
-## Authentication mode used for access to the admin panel.
-##
-## Default: off
-##
-## Acceptable values:
-## - one of: off, userlist
-riak_control.auth.mode = off
-
-## If riak control's authentication mode (riak_control.auth.mode)
-## is set to 'userlist' then this is the list of usernames and
-## passwords for access to the admin panel.
-## To create users with given names, add entries of the format:
-## riak_control.auth.user.USERNAME.password = PASSWORD
-## replacing USERNAME with the desired username and PASSWORD with the
-## desired password for that user.
-##
-## Acceptable values:
-## - text
-## riak_control.auth.user.admin.password = pass
-
-## This parameter defines the percentage of total server memory
-## to assign to LevelDB. LevelDB will dynamically adjust its internal
-## cache sizes to stay within this size. The memory size can
-## alternately be assigned as a byte count via leveldb.maximum_memory
-## instead.
-##
-## Default: 70
-##
-## Acceptable values:
-## - an integer
-leveldb.maximum_memory.percent = 70
-
-## Enables or disables the compression of data on disk.
-## Enabling (default) saves disk space. Disabling may reduce read
-## latency but increase overall disk activity. Option can be
-## changed at any time, but will not impact data on disk until
-## next time a file requires compaction.
-##
-## Default: on
-##
-## Acceptable values:
-## - on or off
-leveldb.compression = on
-
-## Selection of compression algorithms. snappy is
-## original compression supplied for leveldb. lz4 is new
-## algorithm that compresses to similar volume but averages twice
-## as fast on writes and four times as fast on reads.
-##
-## Acceptable values:
-## - one of: snappy, lz4
-leveldb.compression.algorithm = lz4
-
-##
-## Default: on
-##
-## Acceptable values:
-## - on or off
-## multi_backend.name.leveldb.compression = on
-
-##
-## Acceptable values:
-## - one of: snappy, lz4
-## multi_backend.name.leveldb.compression.algorithm = lz4
-
-## Whether to allow search queries.
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.riak_search.query = enabled
-
-## To enable Search set this 'on'.
-##
-## Default: off
-##
-## Acceptable values:
-## - on or off
-search = off
-
-## How long Riak will wait for Solr to start. The start sequence
-## will be tried twice. If both attempts timeout, then the Riak node
-## will be shutdown. This may need to be increased as more data is
-## indexed and Solr takes longer to start. Values lower than 1s will
-## be rounded up to the minimum 1s.
-##
-## Default: 30s
-##
-## Acceptable values:
-## - a time duration with units, e.g. '10s' for 10 seconds
-search.solr.start_timeout = 30s
-
-## The port number which Solr binds to.
-## NOTE: Binds on every interface.
-##
-## Default: 8093
-##
-## Acceptable values:
-## - an integer
-search.solr.port = 8093
-
-## The port number which Solr JMX binds to.
-## NOTE: Binds on every interface.
-##
-## Default: 8985
-##
-## Acceptable values:
-## - an integer
-search.solr.jmx_port = 8985
-
-## The options to pass to the Solr JVM. Non-standard options,
-## i.e. -XX, may not be portable across JVM implementations.
-## E.g. -XX:+UseCompressedStrings
-##
-## Default: -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-##
-## Acceptable values:
-## - text
-search.solr.jvm_options = -d64 -Xms1g -Xmx1g -XX:+UseStringCache -XX:+UseCompressedOops
-
-## The minimum batch size, in number of Riak objects. Any batches that
-## are smaller than this amount will not be immediately flushed to Solr,
-## but are guaranteed to be flushed within the
-## "search.queue.batch.flush_interval".
-##
-## Default: 10
-##
-## Acceptable values:
-## - an integer
-## search.queue.batch.minimum = 10
-
-## The maximum batch size, in number of Riak objects. Any batches that are
-## larger than this amount will be split, where the first
-## search.queue.batch.maximum set of objects will be flushed to Solr, and
-## the remaining objects enqueued for that index will be retained until the
-## next batch is delivered. This parameter ensures that at most
-## "search.queue.batch.maximum object" will be delivered into Solr in any
-## given request.
-##
-## Default: 500
-##
-## Acceptable values:
-## - an integer
-## search.queue.batch.maximum = 500
-
-## The maximum delay between notification to flush batches to Solr. This
-## setting is used to increase or decrease the frequency of batch delivery
-## into Solr, specifically for relatively low-volume input into Riak. This
-## setting ensures that data will be delivered into Solr in accordance with
-## the "search.queue.batch.minimum" and "search.queue.batch.maximum"
-## settings within the specified interval. Batches that are smaller than
-## "search.queue.batch.minimum" will be delivered to Solr within this
-## interval. This setting will generally hav no effect on heavily loaded
-## systems.
-##
-## Default: 500ms
-##
-## Acceptable values:
-## - a time duration with units, e.g. '10s' for 10 seconds
-## - the text "infinity"
-## search.queue.batch.flush_interval = 500ms
-
-## The queue high watermark. If the total number of queued messages in a
-## Solr Queue Worker instance exceeds this limit, then the calling vnode
-## will be blocked until the total number falls below this limit. This
-## parameter exercises flow control between Riak and the Riak
-## Search batching subsystem if writes into Solr start to fall behind.
-##
-## Default: 1000
-##
-## Acceptable values:
-## - an integer
-## search.queue.high_watermark = 1000
-
-## The strategy for how we handle purging when we hit the
-## search.queue.high_watermark.
-## - purge_one -> Removes the oldest item on the queue from an
-## erroring (references to fuses blown in the code) index in
-## order to get below the search.queue.high_watermark.
-## - purge_index -> Removes all items associated with one random
-## erroring (references to fuses blown in the code) index in
-## order to get below the search.queue.high_watermark.
-## - off -> purging is disabled
-##
-## Default: purge_one
-##
-## Acceptable values:
-## - one of: purge_one, purge_index, off
-## search.queue.high_watermark.purge_strategy = purge_one
-
-## Whether to allow Yokozuna queries on this node
-##
-## Default: enabled
-##
-## Acceptable values:
-## - enabled or disabled
-## cluster.job.yokozuna.query = enabled
diff --git a/test/docker/docker-compose.yml b/test/docker/docker-compose.yml
index e6026ac2..f9861203 100644
--- a/test/docker/docker-compose.yml
+++ b/test/docker/docker-compose.yml
@@ -35,14 +35,3 @@ services:
container_name: ejabberd-redis
ports:
- 6379:6379
-
- riak:
- image: ejabberd/riak:latest
- container_name: ejabberd-riak
- ports:
- - 8087:8087
- - 8098:8098
- volumes:
- - ./db/riak/data:/var/lib/riak
- environment:
- WAIT_FOR_ERLANG: 60
diff --git a/test/ejabberd_SUITE.erl b/test/ejabberd_SUITE.erl
index 0f4db5e8..77d767a8 100644
--- a/test/ejabberd_SUITE.erl
+++ b/test/ejabberd_SUITE.erl
@@ -125,15 +125,6 @@ do_init_per_group(ldap, Config) ->
set_opt(server, ?LDAP_VHOST, Config);
do_init_per_group(extauth, Config) ->
set_opt(server, ?EXTAUTH_VHOST, Config);
-do_init_per_group(riak, Config) ->
- case ejabberd_riak:is_connected() of
- true ->
- mod_muc:shutdown_rooms(?RIAK_VHOST),
- NewConfig = set_opt(server, ?RIAK_VHOST, Config),
- clear_riak_tables(NewConfig);
- Err ->
- {skip, {riak_not_available, Err}}
- end;
do_init_per_group(s2s, Config) ->
ejabberd_config:set_option({s2s_use_starttls, ?COMMON_VHOST}, required),
ejabberd_config:set_option(ca_file, "ca.pem"),
@@ -177,13 +168,6 @@ end_per_group(ldap, _Config) ->
ok;
end_per_group(extauth, _Config) ->
ok;
-end_per_group(riak, Config) ->
- case ejabberd_riak:is_connected() of
- true ->
- clear_riak_tables(Config);
- false ->
- Config
- end;
end_per_group(component, _Config) ->
ok;
end_per_group(s2s, Config) ->
@@ -379,28 +363,6 @@ no_db_tests() ->
carbons_tests:single_cases(),
carbons_tests:master_slave_cases()].
-db_tests(riak) ->
- %% No support for mod_pubsub
- [{single_user, [sequence],
- [test_register,
- legacy_auth_tests(),
- auth_plain,
- auth_md5,
- presence_broadcast,
- last,
- roster_tests:single_cases(),
- %%private_tests:single_cases(),
- privacy_tests:single_cases(),
- vcard_tests:single_cases(),
- muc_tests:single_cases(),
- offline_tests:single_cases(),
- test_unregister]},
- muc_tests:master_slave_cases(),
- privacy_tests:master_slave_cases(),
- roster_tests:master_slave_cases(),
- offline_tests:master_slave_cases(riak),
- vcard_tests:master_slave_cases(),
- announce_tests:master_slave_cases()];
db_tests(DB) when DB == mnesia; DB == redis ->
[{single_user, [sequence],
[test_register,
@@ -519,8 +481,7 @@ groups() ->
{redis, [sequence], db_tests(redis)},
{mysql, [sequence], db_tests(mysql)},
{pgsql, [sequence], db_tests(pgsql)},
- {sqlite, [sequence], db_tests(sqlite)},
- {riak, [sequence], db_tests(riak)}].
+ {sqlite, [sequence], db_tests(sqlite)}].
all() ->
[{group, ldap},
@@ -531,7 +492,6 @@ all() ->
{group, pgsql},
{group, sqlite},
{group, extauth},
- {group, riak},
{group, component},
{group, s2s},
stop_ejabberd].
@@ -1113,16 +1073,3 @@ split(Data) ->
(_) ->
true
end, re:split(Data, <<"\s">>)).
-
-clear_riak_tables(Config) ->
- User = ?config(user, Config),
- Server = ?config(server, Config),
- Master = <<"test_master!#$%^*()`~+-;_=[]{}|\\">>,
- Slave = <<"test_slave!#$%^*()`~+-;_=[]{}|\\">>,
- ejabberd_auth:remove_user(User, Server),
- ejabberd_auth:remove_user(Master, Server),
- ejabberd_auth:remove_user(Slave, Server),
- ejabberd_riak:delete(muc_room),
- ejabberd_riak:delete(muc_registered),
- timer:sleep(timer:seconds(5)),
- Config.
diff --git a/test/ejabberd_SUITE_data/ejabberd.riak.yml b/test/ejabberd_SUITE_data/ejabberd.riak.yml
deleted file mode 100644
index 0a64db91..00000000
--- a/test/ejabberd_SUITE_data/ejabberd.riak.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-define_macro:
- RIAK_CONFIG:
- queue_type: ram
- auth_method: riak
- sm_db_type: riak
- modules:
- mod_announce:
- db_type: riak
- access: local
- mod_blocking: []
- mod_caps:
- db_type: riak
- mod_last:
- db_type: riak
- mod_muc:
- db_type: riak
- mod_offline:
- db_type: riak
- mod_privacy:
- db_type: riak
- mod_private:
- db_type: riak
- mod_roster:
- versioning: true
- store_current_id: true
- db_type: riak
- mod_vcard:
- db_type: riak
- mod_vcard_xupdate: []
- mod_adhoc: []
- mod_configure: []
- mod_disco: []
- mod_ping: []
- mod_proxy65: []
- mod_s2s_dialback: []
- mod_legacy_auth: []
- mod_register:
- welcome_message:
- subject: "Welcome!"
- body: "Hi.
-Welcome to this XMPP server."
- mod_stats: []
- mod_time: []
- mod_version: []
diff --git a/test/ejabberd_SUITE_data/ejabberd.yml b/test/ejabberd_SUITE_data/ejabberd.yml
index e5c3e783..d642832d 100644
--- a/test/ejabberd_SUITE_data/ejabberd.yml
+++ b/test/ejabberd_SUITE_data/ejabberd.yml
@@ -6,7 +6,6 @@ include_config_file:
- ejabberd.mysql.yml
- ejabberd.pgsql.yml
- ejabberd.redis.yml
- - ejabberd.riak.yml
- ejabberd.sqlite.yml
host_config:
@@ -15,7 +14,6 @@ host_config:
mysql.localhost: MYSQL_CONFIG
mnesia.localhost: MNESIA_CONFIG
redis.localhost: REDIS_CONFIG
- riak.localhost: RIAK_CONFIG
ldap.localhost: LDAP_CONFIG
extauth.localhost: EXTAUTH_CONFIG
localhost:
@@ -31,7 +29,6 @@ hosts:
- pgsql.localhost
- extauth.localhost
- ldap.localhost
- - riak.localhost
- sqlite.localhost
shaper_rules:
diff --git a/test/offline_tests.erl b/test/offline_tests.erl
index a3a7aad9..be437d41 100644
--- a/test/offline_tests.erl
+++ b/test/offline_tests.erl
@@ -145,14 +145,9 @@ unsupported_iq(Config) ->
master_slave_cases(DB) ->
{offline_master_slave, [sequence],
[master_slave_test(flex),
- master_slave_test(send_all)] ++
- case DB of
- riak -> [];
- _ -> [
- master_slave_test(from_mam),
- master_slave_test(mucsub_mam)]
- end
- }.
+ master_slave_test(send_all),
+ master_slave_test(from_mam),
+ master_slave_test(mucsub_mam)]}.
flex_master(Config) ->
send_messages(Config, 5),
diff --git a/test/suite.erl b/test/suite.erl
index 7e5fa3eb..7c565eac 100644
--- a/test/suite.erl
+++ b/test/suite.erl
@@ -172,9 +172,9 @@ setup_ejabberd_lib_path(Config) ->
ok
end.
-%% Read environment variable CT_DB=riak,mysql to limit the backends to test.
+%% Read environment variable CT_DB=mysql to limit the backends to test.
%% You can thus limit the backend you want to test with:
-%% CT_BACKENDS=riak,mysql rebar ct suites=ejabberd
+%% CT_BACKENDS=mysql rebar ct suites=ejabberd
get_config_backends() ->
EnvBackends = case os:getenv("CT_BACKENDS") of
false -> ?BACKENDS;
diff --git a/test/suite.hrl b/test/suite.hrl
index 2f2abc66..194c48eb 100644
--- a/test/suite.hrl
+++ b/test/suite.hrl
@@ -96,11 +96,10 @@
-define(SQLITE_VHOST, <<"sqlite.localhost">>).
-define(LDAP_VHOST, <<"ldap.localhost">>).
-define(EXTAUTH_VHOST, <<"extauth.localhost">>).
--define(RIAK_VHOST, <<"riak.localhost">>).
-define(S2S_VHOST, <<"s2s.localhost">>).
-define(UPLOAD_VHOST, <<"upload.localhost">>).
--define(BACKENDS, [mnesia, redis, mysql, pgsql, sqlite, ldap, extauth, riak]).
+-define(BACKENDS, [mnesia, redis, mysql, pgsql, sqlite, ldap, extauth]).
insert(Val, N, Tuple) ->
L = tuple_to_list(Tuple),