diff --git a/src/Tests/FlagConfirmFormTest.php b/src/Tests/FlagConfirmFormTest.php
index 9734e19..7d8c520 100644
--- a/src/Tests/FlagConfirmFormTest.php
+++ b/src/Tests/FlagConfirmFormTest.php
@@ -66,6 +66,8 @@ class FlagConfirmFormTest extends WebTestBase {
    * Test the confirm form link type.
    */
   public function testCreateConfirmFlag() {
+    \Drupal::service('module_installer')->uninstall(['dynamic_page_cache']);
+
     // Create and log in our user.
     $this->adminUser = $this->drupalCreateUser([
       'administer flags',
diff --git a/src/Tests/FlagFieldEntryTest.php b/src/Tests/FlagFieldEntryTest.php
index d0fb51a..ce14278 100644
--- a/src/Tests/FlagFieldEntryTest.php
+++ b/src/Tests/FlagFieldEntryTest.php
@@ -77,6 +77,8 @@ class FlagFieldEntryTest extends WebTestBase {
    */
   protected function setUp() {
     parent::setUp();
+    \Drupal::service('module_installer')->uninstall(['dynamic_page_cache']);
+
     // The breadcrumb block is needed for FieldUiTestTrait's tests.
     $this->drupalPlaceBlock('system_breadcrumb_block');
     $this->drupalPlaceBlock('local_tasks_block');
diff --git a/src/Tests/FlagSimpleTest.php b/src/Tests/FlagSimpleTest.php
index e559711..e16d425 100644
--- a/src/Tests/FlagSimpleTest.php
+++ b/src/Tests/FlagSimpleTest.php
@@ -65,6 +65,8 @@ class FlagSimpleTest extends WebTestBase {
    * Configures test base and executes test cases.
    */
   public function testFlagForm() {
+    $this->container->get('module_installer')->uninstall(['dynamic_page_cache']);
+
     // Create and log in our user.
     $this->adminUser = $this->drupalCreateUser([
       'administer flags',
