diff --git a/bspump/pipeline.py b/bspump/pipeline.py
index d4cab73d..ef75d40f 100644
--- a/bspump/pipeline.py
+++ b/bspump/pipeline.py
@@ -172,7 +172,7 @@ They are simply passed as an list of sources to a pipeline `build()` method.
 				self.MetricsCounter.add('warning', 1)
 				self.PubSub.publish("bspump.pipeline.warning!", pipeline=self)
 				return
-
+			else:
 				self.MetricsCounter.add('error', 1)
 
 			if (self._error is not None):

[MetricsCounter] Metric "error" is never incremented
There is unreachable code in https://github.com/LibertyAces/BitSwanPump/blob/372a59237e57089e44954a69fecc8c0f886291e3/bspump/pipeline.py#L176
diff --git a/test/__init__.py b/test/__init__.py
index fe9ab179..218cc96f 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -7,4 +7,5 @@ from .file import *
 from .filter import *
 from .matrix import *
 from .test_config_defaults import *
+from .test_metrics_service import *
 
diff --git a/test/test_metrics_service.py b/test/test_metrics_service.py
new file mode 100644
index 00000000..601685ce
--- /dev/null
+++ b/test/test_metrics_service.py
@@ -0,0 +1,77 @@
+import bspump.common
+from bspump import Processor, Pipeline
+from bspump.trigger import PubSubTrigger
+from bspump.unittest import UnitTestSource, UnitTestSink
+
+
+class RaisingProcessor(Processor):
+
+    def process(self, context, event):
+        if "warning" in event or "error" in event:
+            raise Exception()
+        return event
+
+
+class WarningPipeline(Pipeline):
+
+    def __init__(self, app, id=None, config=None):
+
+        super().__init__(app, id, config)
+        self.PubSub.subscribe("bspump.pipeline.cycle_end!", self._on_finished)
+        self.Source = UnitTestSource(app, self).on(
+                PubSubTrigger(app, "unittest.go!", self.PubSub)
+            )
+        self.Processor = RaisingProcessor(app, self)
+        self.Sink = UnitTestSink(app, self)
+        self.build(
+            self.Source,
+            self.Processor,
+            self.Sink
+        )
+
+    def catch_error(self, exception, event):
+        if event == "warning":
+            return False
+        return super().catch_error(exception, event)
+
+    def _on_finished(self, event_name, pipeline):
+        self.App.stop()
+
+
+class TestMetricsService(bspump.unittest.ProcessorTestCase):
+
+    def _metric_flush(self, _, __, counter):
+        if counter.get("error"):
+            self.ErrorCount += counter["error"]
+        if counter.get("warning"):
+            self.WarningCount += counter["warning"]
+
+    def test_metrics_service(self):
+        self.ErrorCount = 0
+        self.WarningCount = 0
+
+        self.App.PubSub.subscribe(
+            "Application.Metrics.Flush!",
+            self._metric_flush
+        )
+
+        svc = self.App.get_service("bspump.PumpService")
+
+        self.Pipeline = WarningPipeline(self.App)
+
+        self.Pipeline.Source.Input = [
+            (None, "ok"),
+            (None, "warning"),
+            (None, "error"),
+        ]
+        self.Pipeline.PubSub.publish("unittest.go!")
+        svc.add_pipeline(self.Pipeline)
+        self.App.run()
+
+        self.assertEqual(
+            [({}, "ok")],
+            self.Pipeline.Sink.Output
+        )
+        self.assertEqual(1, self.WarningCount)
+        self.assertEqual(1, self.ErrorCount)
+

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov flake8
apt-get update apt-get install -y gcc unixodbc-dev
3.7
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiohttp==3.8.6
aiokafka==0.8.0
aiomysql==0.0.22
aioodbc==0.3.3
aiopg==0.16.0
aioresponses==0.6.0
aiosignal==1.3.1
aiosmtplib==1.1.7
asab==19.11
async-timeout==4.0.3
asyncssh==2.0.1
asynctest==0.13.0
attrs==24.2.0
-e git+https://github.com/LibertyAces/BitSwanPump.git@5fb9f31d0aec0ff6d32c97a45c6a53abd41ab2cf#egg=bspump
cachetools==5.5.2
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
charset-normalizer==3.4.1
coverage==7.2.7
cryptography==44.0.2
exceptiongroup==1.2.2
fastavro==0.24.2
fastjsonschema==2.21.1
flake8==5.0.4
frozenlist==1.3.3
google-api-core==2.24.2
google-api-python-client==1.12.11
google-auth==2.38.0
google-auth-httplib2==0.2.0
googleapis-common-protos==1.69.2
httplib2==0.22.0
idna==3.10
importlib-metadata==4.2.0
iniconfig==2.0.0
kafka-python==2.1.4
mccabe==0.7.0
mongoquery==1.4.2
motor==2.5.1
multidict==6.0.5
mysql-replication==0.25
numpy==1.21.6
packaging==24.0
pandas==0.25.3
pika==1.3.2
pluggy==1.2.0
proto-plus==1.26.1
protobuf==4.24.4
psycopg2-binary==2.9.9
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycodestyle==2.9.1
pycparser==2.21
pyflakes==2.5.0
pymongo==3.13.0
PyMySQL==0.9.2
pyodbc==4.0.39
pyparsing==3.1.4
pytest==7.4.4
pytest-cov==4.1.0
python-dateutil==2.9.0.post0
pytz==2019.3
requests==2.31.0
rsa==4.9
six==1.17.0
tomli==2.0.1
typing_extensions==4.7.1
uritemplate==3.0.1
urllib3==2.0.7
yarl==1.9.4
zipp==3.15.0

name: BitSwanPump
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiohttp==3.8.6
      - aiokafka==0.8.0
      - aiomysql==0.0.22
      - aioodbc==0.3.3
      - aiopg==0.16.0
      - aioresponses==0.6.0
      - aiosignal==1.3.1
      - aiosmtplib==1.1.7
      - asab==19.11
      - async-timeout==4.0.3
      - asyncssh==2.0.1
      - asynctest==0.13.0
      - attrs==24.2.0
      - cachetools==5.5.2
      - cffi==1.15.1
      - charset-normalizer==3.4.1
      - coverage==7.2.7
      - cryptography==44.0.2
      - exceptiongroup==1.2.2
      - fastavro==0.24.2
      - fastjsonschema==2.21.1
      - flake8==5.0.4
      - frozenlist==1.3.3
      - google-api-core==2.24.2
      - google-api-python-client==1.12.11
      - google-auth==2.38.0
      - google-auth-httplib2==0.2.0
      - googleapis-common-protos==1.69.2
      - httplib2==0.22.0
      - idna==3.10
      - importlib-metadata==4.2.0
      - iniconfig==2.0.0
      - kafka-python==2.1.4
      - mccabe==0.7.0
      - mongoquery==1.4.2
      - motor==2.5.1
      - multidict==6.0.5
      - mysql-replication==0.25
      - numpy==1.21.6
      - packaging==24.0
      - pandas==0.25.3
      - pika==1.3.2
      - pluggy==1.2.0
      - proto-plus==1.26.1
      - protobuf==4.24.4
      - psycopg2-binary==2.9.9
      - pyasn1==0.5.1
      - pyasn1-modules==0.3.0
      - pycodestyle==2.9.1
      - pycparser==2.21
      - pyflakes==2.5.0
      - pymongo==3.13.0
      - pymysql==0.9.2
      - pyodbc==4.0.39
      - pyparsing==3.1.4
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - python-dateutil==2.9.0.post0
      - pytz==2019.3
      - requests==2.31.0
      - rsa==4.9
      - six==1.17.0
      - tomli==2.0.1
      - typing-extensions==4.7.1
      - uritemplate==3.0.1
      - urllib3==2.0.7
      - yarl==1.9.4
      - zipp==3.15.0
prefix: /opt/conda/envs/BitSwanPump

test/test_metrics_service.py::TestMetricsService::test_metrics_service
test/test_config_defaults.py::TestConfigDefaults::test_default_value_is_not_none
bspump/pipeline.py
bspump/pipeline.py