diff --git a/test/io/gridmanager/gridmanagertests.hh b/test/io/gridmanager/gridmanagertests.hh
index 9ba89f6aa448142a0466e03568be6ab962886a64..58f61d7bf59773b7a930630e8f6fd042fccb3cc1 100644
--- a/test/io/gridmanager/gridmanagertests.hh
+++ b/test/io/gridmanager/gridmanagertests.hh
@@ -31,6 +31,7 @@
 
 #include <dumux/io/grid/gridmanager.hh>
 #include <dumux/discretization/method.hh>
+#include <dumux/common/gridcapabilities.hh>
 
 namespace Dumux {
 
@@ -287,9 +288,12 @@ private:
         if (gridView.comm().size() > 1)
         {
             VertexHandleNonZeroMin<GridView> dataHandle(boundaryMarker, gridView);
-            gridView.communicate(dataHandle,
-                                 Dune::InteriorBorder_All_Interface,
-                                 Dune::ForwardCommunication);
+            if constexpr (Detail::canCommunicate<typename GridView::Traits::Grid, GridView::dimension>)
+                gridView.communicate(dataHandle,
+                                     Dune::InteriorBorder_All_Interface,
+                                     Dune::ForwardCommunication);
+            else
+                DUNE_THROW(Dune::InvalidStateException, "Cannot call getBoundaryMarkers_ on multiple processes for a grid that cannot communicate codim-" << GridView::dimension << "-entities");
         }
     }
 };
diff --git a/test/porousmediumflow/co2/problem.hh b/test/porousmediumflow/co2/problem.hh
index 6ab508f783691c2dc8d087a5dbfb092606e7e9af..3e6db0df59f257f6aaea2fc6411cc2f3783fbd49 100644
--- a/test/porousmediumflow/co2/problem.hh
+++ b/test/porousmediumflow/co2/problem.hh
@@ -37,6 +37,7 @@
 #include <dumux/porousmediumflow/problem.hh>
 #include <dumux/discretization/box/scvftoscvboundarytypes.hh>
 #include <dumux/material/components/co2.hh>
+#include <dumux/common/gridcapabilities.hh>
 
 #include "co2tables.hh"
 
@@ -235,9 +236,12 @@ public:
             {
                 VectorCommDataHandleSum<typename GridGeometry::VertexMapper, std::vector<Scalar>, GridView::dimension>
                 sumVolumeHandle(this->gridGeometry().vertexMapper(), vtkBoxVolume_);
-                gridView.communicate(sumVolumeHandle,
-                                     Dune::InteriorBorder_InteriorBorder_Interface,
-                                     Dune::ForwardCommunication);
+                if constexpr (Detail::canCommunicate<typename GridView::Traits::Grid, GridView::dimension>)
+                    gridView.communicate(sumVolumeHandle,
+                                         Dune::InteriorBorder_InteriorBorder_Interface,
+                                         Dune::ForwardCommunication);
+                else
+                    DUNE_THROW(Dune::InvalidStateException, "Cannot call addFieldsToWriter on multiple processes for a grid that cannot communicate codim-" << GridView::dimension << "-entities.");
             }
         }
     }