summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-03 12:55:51 +0100
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-03 12:55:51 +0100
commit371b445ab2d9d0f9ad0fd28856095e6a291c7c59 (patch)
treeed04109a089b2ee2b994d5f561e7141210d74877
parent2f44cb427fcf669e16639225c4392e0eb09a0a57 (diff)
downloadnode-startup-controller-371b445ab2d9d0f9ad0fd28856095e6a291c7c59.tar.gz
Add NSM dummy documentation page
-rw-r--r--docs/reference/node-startup-controller/test-nsm-dummy.xml56
1 files changed, 56 insertions, 0 deletions
diff --git a/docs/reference/node-startup-controller/test-nsm-dummy.xml b/docs/reference/node-startup-controller/test-nsm-dummy.xml
new file mode 100644
index 0000000..e967790
--- /dev/null
+++ b/docs/reference/node-startup-controller/test-nsm-dummy.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
+ "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
+]>
+<refentry id="test-nsm-dummy">
+ <refmeta>
+ <refentrytitle>Testing against the NSM dummy</refentrytitle>
+ </refmeta>
+
+ <refnamediv>
+ <refname>Testing against the NSM dummy</refname>
+ <refpurpose>Important things to know when testing against the NSM dummy implementation</refpurpose>
+ </refnamediv>
+
+ <refsect1>
+ <title>Notes about the NSM dummy behaviour</title>
+ <para>
+ We do not guarantee that our NSM dummy is functional equivalent to
+ the real NSM. The dummy does however, provide the same interfaces and
+ the behaviour of all public methods used by the Node Startup
+ Controller should be very similar to that of the real NSM.
+ </para>
+ <para>
+ We implemented a few special features in the NSM dummy that make
+ testing the Node Startup Controller easier:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <literal>com.contiautomotive.NodeStateManager.LifecycleControl.CheckLucRequired</literal>
+ will alternative between returning <literal>TRUE</literal> and
+ <literal>FALSE</literal> with every call. This way we can test how the
+ Node Startup Controller behaves with and without starting the LUC simply by
+ starting it twice.
+ </listitem>
+ <listitem>
+ <literal>com.contiautomotive.NodeStateManager.LifecycleControl.SetNodeState</literal>
+ will alternative between accepting the state and not accepting the state with
+ every call. This way we can test how the Node Startup Controller handles both
+ scenarios.
+ </listitem>
+ <listitem>
+ The NSM dummy will shut down all registered shutdown consumers upon receiving
+ <literal>SIGHUP</literal>. This allows to test the shutdown sequence by running
+ the following command:
+ <programlisting>kill -s HUP $(pidof nsm-dummy)</programlisting>
+ </listitem>
+ <listitem>
+ Unlike the real NSM, which only ever shuts down using one shutdown
+ mode, the NSM dummy will shut down the consumers for all modes.
+ The modes are isolated from each other to avoid undesired
+ side-effects of this difference in implementation.
+ </listitem>
+ </itemizedlist>
+ </refsect1>
+</refentry>
+