mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-15 17:16:16 +08:00
test(server): avoid db deadlock on unittest (#10104)
https://github.com/toeverything/AFFiNE/runs/37010719190 
This commit is contained in:
@@ -156,8 +156,15 @@ export class TestingApp extends ApplyType<INestApplication>() {
|
||||
.send({
|
||||
query,
|
||||
variables,
|
||||
})
|
||||
.expect(200);
|
||||
});
|
||||
|
||||
if (res.status !== 200) {
|
||||
throw new Error(
|
||||
`Failed to execute gql: ${query}, status: ${res.status}, body: ${JSON.stringify(
|
||||
res.body
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
if (res.body.errors?.length) {
|
||||
throw new Error(res.body.errors[0].message);
|
||||
|
||||
Reference in New Issue
Block a user