diff --git a/test/async/context.cpp b/test/async/context.cpp
index 6e688c7..03480c9 100644
--- a/test/async/context.cpp
+++ b/test/async/context.cpp
@@ -15,8 +15,8 @@
 
     void spawnStop()
     {
-        ctx->spawn(std::execution::just() |
-                   std::execution::then([this]() { ctx->request_stop(); }));
+        ctx->spawn(stdexec::just() |
+                   stdexec::then([this]() { ctx->request_stop(); }));
     }
 
     void runToStop()
@@ -35,7 +35,7 @@
 
 TEST_F(Context, SpawnedTask)
 {
-    ctx->spawn(std::execution::just());
+    ctx->spawn(stdexec::just());
     runToStop();
 }
 
@@ -50,8 +50,8 @@
 
 TEST_F(Context, SpawnThrowingTask)
 {
-    ctx->spawn(std::execution::just() |
-               std::execution::then([]() { throw std::logic_error("Oops"); }));
+    ctx->spawn(stdexec::just() |
+               stdexec::then([]() { throw std::logic_error("Oops"); }));
 
     EXPECT_THROW(runToStop(), std::logic_error);
     ctx->run();
@@ -62,9 +62,8 @@
     static constexpr size_t count = 100;
     for (size_t i = 0; i < count; ++i)
     {
-        ctx->spawn(std::execution::just() | std::execution::then([]() {
-                       throw std::logic_error("Oops");
-                   }));
+        ctx->spawn(stdexec::just() |
+                   stdexec::then([]() { throw std::logic_error("Oops"); }));
     }
     spawnStop();
 
@@ -84,7 +83,7 @@
 
     bool ran = false;
     ctx->spawn(sdbusplus::async::sleep_for(*ctx, timeout) |
-               std::execution::then([&ran]() { ran = true; }));
+               stdexec::then([&ran]() { ran = true; }));
 
     runToStop();
 
@@ -107,16 +106,15 @@
                 ++executed;
                 co_return (co_await one(count - 1, executed)) + 1;
             }
-            co_return co_await std::execution::just(0);
+            co_return co_await stdexec::just(0);
         }
     };
 
     static constexpr size_t count = 100;
     size_t executed = 0;
 
-    ctx->spawn(_::one(count, executed) | std::execution::then([=](auto result) {
-                   EXPECT_EQ(result, count);
-               }));
+    ctx->spawn(_::one(count, executed) |
+               stdexec::then([=](auto result) { EXPECT_EQ(result, count); }));
 
     runToStop();
 
@@ -133,11 +131,11 @@
                   "/this/is/a/bogus/path/for/SpawnMatcher"));
 
     // Await the match completion (which will never happen).
-    ctx->spawn(m->next() | std::execution::then([&ran](...) { ran = true; }));
+    ctx->spawn(m->next() | stdexec::then([&ran](...) { ran = true; }));
 
     // Destruct the match.
     ctx->spawn(sdbusplus::async::sleep_for(*ctx, 1ms) |
-               std::execution::then([&m](...) { m.reset(); }));
+               stdexec::then([&m](...) { m.reset(); }));
 
     EXPECT_THROW(runToStop(), sdbusplus::exception::UnhandledStop);
     EXPECT_NO_THROW(ctx->run());
@@ -166,7 +164,7 @@
     bool ran = false;
     ctx->spawn(_::fn(m->next(), ran));
     ctx->spawn(sdbusplus::async::sleep_for(*ctx, 1ms) |
-               std::execution::then([&]() { m.reset(); }));
+               stdexec::then([&]() { m.reset(); }));
 
     EXPECT_THROW(runToStop(), sdbusplus::exception::UnhandledStop);
     EXPECT_NO_THROW(ctx->run());
diff --git a/test/async/task.cpp b/test/async/task.cpp
index 6ee90f8..a7e5a15 100644
--- a/test/async/task.cpp
+++ b/test/async/task.cpp
@@ -17,7 +17,7 @@
     EXPECT_FALSE(value);
 
     // Run it and confirm the value is updated.
-    std::this_thread::sync_wait(t());
+    stdexec::this_thread::sync_wait(t());
     EXPECT_TRUE(value);
 }
 
@@ -41,7 +41,7 @@
     // Add boolean to confirm that co-routine actually executed by the
     // end.
     bool executed = false;
-    std::this_thread::sync_wait(_::two(executed));
+    stdexec::this_thread::sync_wait(_::two(executed));
     EXPECT_TRUE(executed);
 }
 
@@ -69,11 +69,11 @@
     };
 
     // Ensure throws surface up.
-    EXPECT_THROW(std::this_thread::sync_wait(_::one()), std::logic_error);
+    EXPECT_THROW(stdexec::this_thread::sync_wait(_::one()), std::logic_error);
 
     // Ensure throws can be caught inside a co-routine.
     bool caught = false;
-    std::this_thread::sync_wait(_::two(caught));
+    stdexec::this_thread::sync_wait(_::two(caught));
     EXPECT_TRUE(caught);
 }
 
@@ -88,16 +88,16 @@
                 ++executed;
                 co_return (co_await one(count - 1, executed)) + 1;
             }
-            co_return co_await std::execution::just(0);
+            co_return co_await stdexec::just(0);
         }
     };
 
     static constexpr size_t count = 100;
     size_t executed = 0;
 
-    std::this_thread::sync_wait(
+    stdexec::this_thread::sync_wait(
         _::one(count, executed) |
-        std::execution::then([=](auto result) { EXPECT_EQ(result, count); }));
+        stdexec::then([=](auto result) { EXPECT_EQ(result, count); }));
 
     EXPECT_EQ(executed, count);
 }
diff --git a/test/async/timer.cpp b/test/async/timer.cpp
index 07e7de7..7aee04f 100644
--- a/test/async/timer.cpp
+++ b/test/async/timer.cpp
@@ -15,7 +15,7 @@
     auto start = std::chrono::steady_clock::now();
 
     ctx.spawn(sdbusplus::async::sleep_for(ctx, timeout) |
-              std::execution::then([&ctx]() { ctx.request_stop(); }));
+              stdexec::then([&ctx]() { ctx.request_stop(); }));
     ctx.run();
 
     auto stop = std::chrono::steady_clock::now();
