Skip to content

e2e 夹具:link proxy 先 restore 再 cut 会永久断开,超时用例会留下测试库 #139

Open

Description

@joesmart

现象

#131 复核时发现了两个 e2e 夹具缺陷,和产品代码无关。

1. startLinkProxy 的 cut 开关只要先 restore 再 cut 就会永久断开

位置是 packages/e2e/src/stack.ts 的 startLinkProxy。cut 是一个粘住的开关:设为 true 后,每一条新的 GET /agent 连接都会被直接销毁,直到有人调 restore() 才复位。

用例如果先调了 restore、后调了 cut,就再没有人复位这个开关,代理会一直 socket hang up,直到用例超时。#131 在 outbox-cap.test.ts 里先等 cut 变成 true 再接回,绕开了这个问题。夹具本身可以改成 restore 时把这个顺序的情况也处理掉,或者在顺序反了时直接报错。

2. 超时的 e2e 用例会留下 baize_e2e_* 测试库

用例超时后,随机建的测试库没有被删掉。复核时 7 次超时留下了 2 个库。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions