Merge "[Win] Fix path and timing issues in unit tests" into emu-master-dev
diff --git a/android/android-emu/android/base/async/AsyncSocketServer_unittest.cpp b/android/android-emu/android/base/async/AsyncSocketServer_unittest.cpp
index 4f3efeb..29094ff 100644
--- a/android/android-emu/android/base/async/AsyncSocketServer_unittest.cpp
+++ b/android/android-emu/android/base/async/AsyncSocketServer_unittest.cpp
@@ -104,7 +104,7 @@
 
 TEST(AsyncSocketServer, createTcpLoopbackServerIPv4) {
     int kPort = 0;  // random high value?
-    int kDelayMs = 20;
+    int kDelayMs = 100; // Lets not be too aggresive..
     Looper* looper = ThreadLooper::get();
 
     TestData data(looper, kPort);
diff --git a/android/android-emu/android/emulation/control/ScreenCapturer_unittest.cpp b/android/android-emu/android/emulation/control/ScreenCapturer_unittest.cpp
index 1ae75a5..25252e3 100644
--- a/android/android-emu/android/emulation/control/ScreenCapturer_unittest.cpp
+++ b/android/android-emu/android/emulation/control/ScreenCapturer_unittest.cpp
@@ -368,8 +368,9 @@
 TEST_F(ScreenCapturerTest, pbFileSuccess) {
     MockRenderer renderer(true);
     // Create a temporary file with a .pb extension.
+
     const std::string tmp_file = PathUtils::join(
-            System::get()->getTempDir(), "normal_file.pb");
+                mTestSystem.getTempRoot()->path(), "normal_file.pb");
     FILE* file = std::fopen(tmp_file.c_str(), "w");
     EXPECT_THAT(file, testing::NotNull()) << "Failed to open " << tmp_file;
     EXPECT_THAT(std::fclose(file), testing::Eq(0));