[modular tests] Increase robustness against timeout.

The way we use timeouts is not robust, because on slow machines
tests just take longer and might run into timeouts. Until we
can control time better, a few mitigations:

* For all integration tests, increase total integration test timeout
  used by default in dev_base_shell from 15s to 30s.

* In the link_data test, stop a story before delete, so we are less
  likely to hit the total sessionmgr teardown timeout at the
  end of the test.

* Also in the link_data test, Signal() to base shell that the test
  is at the end, rather than to Logout() outright. This doesn't
  affect timeouts, but is just more uniform.

TESTED=/pkgfs/packages/modular_tests/0/test/run_modular_tests.sh on
  a chromebook.

Change-Id: Icdba9d12544a42d8eb5b3cf3286e70d7927ad7db
diff --git a/public/lib/integration_testing/cpp/testing.h b/public/lib/integration_testing/cpp/testing.h
index f3442e5..e8acde5 100644
--- a/public/lib/integration_testing/cpp/testing.h
+++ b/public/lib/integration_testing/cpp/testing.h
@@ -19,7 +19,7 @@
 
 // Integration tests that run under DevBaseShell are cut off after this
 // timeout.
-constexpr int kTestTimeoutMilliseconds = 15000;
+constexpr int kTestTimeoutMilliseconds = 30000;
 
 // Connects to the TestRunner service in the caller's Environment.
 // This function must be invoked first before calling any of the ones below. A
diff --git a/tests/link_data/link_data_test_session_shell.cc b/tests/link_data/link_data_test_session_shell.cc
index dd5ef22..c2cc5a6 100644
--- a/tests/link_data/link_data_test_session_shell.cc
+++ b/tests/link_data/link_data_test_session_shell.cc
@@ -26,6 +26,7 @@
 
 using modular::testing::Await;
 using modular::testing::Get;
+using modular::testing::Signal;
 using modular::testing::TestPoint;
 
 namespace {
@@ -230,16 +231,25 @@
         return;
       }
 
-      TestStory2_Delete();
+      TestStory2_Stop();
     });
   }
 
   TestPoint story2_stop_{"Story2 Stop"};
 
+  void TestStory2_Stop() {
+    story_controller_->Stop([this] {
+      story2_stop_.Pass();
+      TestStory2_Delete();
+    });
+  }
+
+  TestPoint story2_delete_{"Story2 Delete"};
+
   void TestStory2_Delete() {
     puppet_master_->DeleteStory(story_info_.id, [this] {
-      story2_stop_.Pass();
-      session_shell_context_->Logout();
+      story2_delete_.Pass();
+      Signal(modular::testing::kTestShutdown);
     });
   }