summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d01cf06)
raw | patch | inline | side by side (parent: d01cf06)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Jan 2015 23:18:36 +0000 (15:18 -0800) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 17 Jan 2015 23:18:36 +0000 (15:18 -0800) |
Set up a second SysDB instance which receives all data from the other
instance. Query the receiver instead of the collector.
instance. Query the receiver instead of the collector.
t/integration/query.sh | patch | blob | history | |
t/integration/test_lib.sh | patch | blob | history |
diff --git a/t/integration/query.sh b/t/integration/query.sh
index c9490f6a5218866728ed346d7b249e42bf584452..c9b21b6063d001ae29bd92d302259dc41671c043 100755 (executable)
--- a/t/integration/query.sh
+++ b/t/integration/query.sh
Interval 2
LoadPlugin mock_timeseries
+EOF
+
+run_sysdbd -D -C "$SYSDBD_CONF"
+wait_for_sysdbd
+
+cat <<EOF > "${SYSDBD_CONF}.sender"
+Listen "${SOCKET_FILE}.sender"
+PluginDir "$PLUGIN_DIR"
+Interval 2
+
+LoadPlugin "store::network"
+<Plugin "store::network">
+ Server "$SOCKET_FILE"
+</Plugin>
LoadBackend mock_plugin
<Backend "mock_plugin">
</Backend>
EOF
-run_sysdbd -D -C "$SYSDBD_CONF"
+run_sysdbd_foreground -D -C "${SYSDBD_CONF}.sender" &
+SYSDBD_PID2=$!
+trap "kill \$SYSDBD_PID2" EXIT
+wait_for_sysdbd "${SOCKET_FILE}.sender"
-wait_for_sysdbd
+# wait for initial data
sleep 3
# Invalid user.
index 469198afd4c7341bb56c0ce841158d28ee3d6261..9f501f6c3f7ccbf587c6637f6560074102486d87 100644 (file)
cp "$TOP_SRCDIR/t/integration/.libs/mock_timeseries.so" "$TESTDIR"
cp "$TOP_SRCDIR/t/integration/.libs/mock_plugin.so" "$TESTDIR/backend"
+mkdir "$TESTDIR/store"
+cp "$TOP_SRCDIR/src/plugins/store/.libs/network.so" "$TESTDIR/store"
+
cp "$TOP_SRCDIR"/src/sysdb "$TESTDIR"
cp "$TOP_SRCDIR"/src/sysdbd "$TESTDIR"
function wait_for_sysdbd() {
local socket="$SOCKET_FILE"
+ if test -n "$1"; then
+ socket="$1"
+ fi
local i
for (( i=0; i<10; i++ )); do
if test -e "$socket"; then