From ffad4578a679e3697decac22458af90429f6ba8d Mon Sep 17 00:00:00 2001 From: Jinho Ayden Jeong <144667387+ayden94@users.noreply.github.com> Date: Thu, 7 May 2026 22:17:29 +0900 Subject: [PATCH 1/2] Resolve #1660: Align portability harness example --- book/advanced/ch14-portability-testing.ko.md | 4 +++- book/advanced/ch14-portability-testing.md | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/book/advanced/ch14-portability-testing.ko.md b/book/advanced/ch14-portability-testing.ko.md index f76234a3..4c4a2e79 100644 --- a/book/advanced/ch14-portability-testing.ko.md +++ b/book/advanced/ch14-portability-testing.ko.md @@ -215,7 +215,9 @@ const harness = createHttpAdapterPortabilityHarness({ return app; }, run: async (module, opts) => { - return await FluoFactory.run(module, { adapter: myAdapter(opts) }); + const app = await FluoFactory.create(module, { adapter: myAdapter(opts) }); + await app.listen(); + return app; } }); diff --git a/book/advanced/ch14-portability-testing.md b/book/advanced/ch14-portability-testing.md index 24170dd0..8515eb8d 100644 --- a/book/advanced/ch14-portability-testing.md +++ b/book/advanced/ch14-portability-testing.md @@ -215,7 +215,9 @@ const harness = createHttpAdapterPortabilityHarness({ return app; }, run: async (module, opts) => { - return await FluoFactory.run(module, { adapter: myAdapter(opts) }); + const app = await FluoFactory.create(module, { adapter: myAdapter(opts) }); + await app.listen(); + return app; } }); From daef5b96de3314c4af633b30f6f92890d5d6b9a1 Mon Sep 17 00:00:00 2001 From: Jinho Ayden Jeong <144667387+ayden94@users.noreply.github.com> Date: Thu, 7 May 2026 22:22:02 +0900 Subject: [PATCH 2/2] Fix #1660: Add portability example import --- book/advanced/ch14-portability-testing.ko.md | 1 + book/advanced/ch14-portability-testing.md | 1 + 2 files changed, 2 insertions(+) diff --git a/book/advanced/ch14-portability-testing.ko.md b/book/advanced/ch14-portability-testing.ko.md index 4c4a2e79..7a0879fc 100644 --- a/book/advanced/ch14-portability-testing.ko.md +++ b/book/advanced/ch14-portability-testing.ko.md @@ -205,6 +205,7 @@ WebSocket 하네스에는 "백프레셔(backpressure)" 테스트도 포함되어 13장에서 커스텀 어댑터를 구현했다면, 이제 하네스를 사용해 이를 검증해야 합니다. 이는 어댑터가 fluo 동작 계약을 준수하는지 확인하는 핵심 테스트입니다. 이식성 하네스를 통과하면 기존 비즈니스 로직을 깨뜨리지 않고 서로 다른 런타임에 어댑터를 배포할 수 있다는 근거를 얻습니다. ```typescript +import { FluoFactory } from '@fluojs/runtime'; import { createHttpAdapterPortabilityHarness } from '@fluojs/testing/http-adapter-portability'; import { myAdapter } from './my-adapter'; diff --git a/book/advanced/ch14-portability-testing.md b/book/advanced/ch14-portability-testing.md index 8515eb8d..407f4ee3 100644 --- a/book/advanced/ch14-portability-testing.md +++ b/book/advanced/ch14-portability-testing.md @@ -205,6 +205,7 @@ The WebSocket harness also includes "backpressure" tests. These verify that the If you implemented a custom adapter in Chapter 13, you should now verify it with the harness. This is the key test that checks whether your adapter complies with the fluo Behavioral Contract. Passing the portability harness gives you evidence that the adapter can be deployed to different runtimes without breaking existing business logic. ```typescript +import { FluoFactory } from '@fluojs/runtime'; import { createHttpAdapterPortabilityHarness } from '@fluojs/testing/http-adapter-portability'; import { myAdapter } from './my-adapter';