Skip to content

Commit 5d7f7cb

Browse files
Charlie Cookfacebook-github-bot
authored andcommitted
Remove Thrift tests' reliance on sync processors
Summary: Title Reviewed By: rmakheja Differential Revision: D76623165 fbshipit-source-id: 307cb7bf77dda61ac1d76d9d35b9a4b91a8709af
1 parent ac70c17 commit 5d7f7cb

File tree

1 file changed

+8
-5
lines changed
  • third-party/thrift/src/thrift/lib/hack/src/protocol/__tests__

1 file changed

+8
-5
lines changed

third-party/thrift/src/thrift/lib/hack/src/protocol/__tests__/AdapterTest.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,11 @@ public static function toThrift(
221221
}
222222
}
223223

224-
final class AdapterTestServiceHandler implements AdapterTest\ServiceIf {
225-
public function func(string $arg1, ?AdapterTest\Foo $arg2): vec<int> {
224+
final class AdapterTestServiceHandler implements AdapterTest\ServiceAsyncIf {
225+
public async function func(
226+
string $arg1,
227+
?AdapterTest\Foo $arg2,
228+
): Awaitable<vec<int>> {
226229
expect($arg1)->toEqual('1');
227230
expect($arg2?->intField)->toEqual('2');
228231
return vec[3, 4];
@@ -231,12 +234,12 @@ public function func(string $arg1, ?AdapterTest\Foo $arg2): vec<int> {
231234

232235
<<Oncalls('thrift')>>
233236
final class AdapterTestServer extends METAThriftServer {
234-
const type TProcessor = AdapterTest\ServiceSyncProcessor;
237+
const type TProcessor = AdapterTest\ServiceAsyncProcessor;
235238

236239
<<__Override>>
237-
protected function getProcessor(): AdapterTest\ServiceSyncProcessor {
240+
protected function getProcessor(): AdapterTest\ServiceAsyncProcessor {
238241
return
239-
new AdapterTest\ServiceSyncProcessor(new AdapterTestServiceHandler());
242+
new AdapterTest\ServiceAsyncProcessor(new AdapterTestServiceHandler());
240243
}
241244

242245
<<__Override>>

0 commit comments

Comments
 (0)