Skip to content

Commit

Permalink
[type:e2e] e2e add deleteWaiting. waiting delete selector sync to boo…
Browse files Browse the repository at this point in the history
…tstrap. (apache#5186)
  • Loading branch information
yunlongn authored Sep 26, 2023
1 parent fe5077c commit 4b0025a
Show file tree
Hide file tree
Showing 18 changed files with 161 additions and 80 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public ShenYuScenarioSpec testWithUriEquals() {
.addNotExists("/put")
.addNotExists("/get")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -132,7 +132,7 @@ public ShenYuScenarioSpec testWithUriPathPattern() {
.addExists(Method.PUT, "/dubbo/demo/findAll")
.addExists(Method.DELETE, "/dubbo/demo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/demo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -170,7 +170,7 @@ public ShenYuScenarioSpec testWithUriStartWith() {
.addExists(Method.PUT, "/dubbo/findAll")
.addExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -208,7 +208,7 @@ public ShenYuScenarioSpec testWithEndWith() {
.addExists(Method.PUT, "/dubbo/findAll")
.addExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -252,7 +252,7 @@ public ShenYuScenarioSpec testWithMethodGet() {
.addNotExists(Method.PUT, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -296,7 +296,7 @@ public ShenYuScenarioSpec testWithMethodPost() {
.addNotExists(Method.PUT, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -340,7 +340,7 @@ public ShenYuScenarioSpec testWithMethodPut() {
.addNotExists(Method.POST, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -384,7 +384,7 @@ public ShenYuScenarioSpec testWithMethodDelete() {
.addNotExists(Method.POST, "/dubbo/findAll")
.addNotExists(Method.PUT, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, "/dubbo/findAll")).build())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void testSpringCloud(final GatewayClient gateway, final CaseSpec spec) {
@AfterEach
void after(final AdminClient client, final GatewayClient gateway, final AfterEachSpec spec) {
spec.getDeleter().delete(client, selectorIds);
spec.getPostChecker().check(gateway);
spec.deleteWaiting().waitFor(gateway);
selectorIds = Lists.newArrayList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public ShenYuScenarioSpec testWithUriEquals() {
.addNotExists("/put")
.addNotExists("/get")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -132,7 +132,7 @@ public ShenYuScenarioSpec testWithUriPathPattern() {
.addExists(Method.PUT, "/dubbo/findAll")
.addExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -170,7 +170,7 @@ public ShenYuScenarioSpec testWithUriStartWith() {
.addExists(Method.PUT, "/dubbo/findAll")
.addExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -208,7 +208,7 @@ public ShenYuScenarioSpec testWithEndWith() {
.addExists(Method.PUT, "/dubbo/findAll")
.addExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -252,7 +252,7 @@ public ShenYuScenarioSpec testWithMethodGet() {
.addNotExists(Method.PUT, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -296,7 +296,7 @@ public ShenYuScenarioSpec testWithMethodPost() {
.addNotExists(Method.PUT, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -340,7 +340,7 @@ public ShenYuScenarioSpec testWithMethodPut() {
.addNotExists(Method.POST, "/dubbo/findAll")
.addNotExists(Method.DELETE, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, "/dubbo/findAll")).build())
.build();
}

Expand Down Expand Up @@ -384,7 +384,7 @@ public ShenYuScenarioSpec testWithMethodDelete() {
.addNotExists(Method.POST, "/dubbo/findAll")
.addNotExists(Method.PUT, "/dubbo/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, "/dubbo/findAll")).build())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ void testSpringCloud(final GatewayClient gateway, final CaseSpec spec) {
@AfterEach
void after(final AdminClient client, final GatewayClient gateway, final AfterEachSpec spec) {
spec.getDeleter().delete(client, selectorIds);
spec.getPostChecker().check(gateway);
spec.deleteWaiting().waitFor(gateway);
selectorIds = Lists.newArrayList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public ShenYuScenarioSpec testWithUriEquals() {
.addNotExists("/put")
.addNotExists("/get")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/brpc/testchecker")).build())
.build();
}

Expand Down Expand Up @@ -119,7 +119,7 @@ public ShenYuScenarioSpec testWithUriPathPattern() {
.addNotExists(Method.PUT, "/brpc/testP")
.addNotExists(Method.DELETE, "/brpc/testD")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/brpc/testchecker")).build())
.build();
}

Expand Down Expand Up @@ -155,7 +155,7 @@ public ShenYuScenarioSpec testWithUriStartWith() {
.addNotExists(Method.PUT, "/brpc/testput")
.addNotExists(Method.DELETE, "/brpc/tesdelete")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/brpc/testcheck")).build())
.build();
}

Expand Down Expand Up @@ -191,7 +191,7 @@ public ShenYuScenarioSpec testWithEndWith() {
.addNotExists(Method.PUT, "/brpc/testPut")
.addNotExists(Method.DELETE, "/brpc/testDelete")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/brpc/testcheck")).build())
.build();
}

Expand Down Expand Up @@ -233,7 +233,7 @@ public ShenYuScenarioSpec testWithMethodGet() {
.addNotExists(Method.PUT, "/brpc/testput")
.addNotExists(Method.DELETE, "/brpc/testdelete")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, "/brpc/tesget")).build())
.build();
}

Expand Down Expand Up @@ -274,7 +274,7 @@ public ShenYuScenarioSpec testWithMethodPost() {
.addNotExists(Method.PUT, "/brpc/testput")
.addNotExists(Method.DELETE, "/brpc/testdelete")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, "/brpc/testpost")).build())
.build();
}

Expand Down Expand Up @@ -313,7 +313,7 @@ public ShenYuScenarioSpec testWithMethodPut() {
.addNotExists(Method.POST, "/brpc/testpost")
.addNotExists(Method.DELETE, "/brpc/testdelete")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, "/brpc/testput")).build())
.build();
}

Expand Down Expand Up @@ -352,7 +352,7 @@ public ShenYuScenarioSpec testWithMethodDelete() {
.addNotExists(Method.POST, "/brpc/testpost")
.addNotExists(Method.PUT, "/brpc/testput")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, "/brpc/testdelete")).build())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ void testBrpc(final GatewayClient gateway, final CaseSpec spec) {
@AfterEach
void after(final AdminClient client, final GatewayClient gateway, final AfterEachSpec spec) {
spec.getDeleter().delete(client, selectorIds);
spec.getPostChecker().check(gateway);
spec.deleteWaiting().waitFor(gateway);
selectorIds = Lists.newArrayList();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public ShenYuScenarioSpec testWithUriEquals() {
.addNotExists("/put")
.addNotExists("/get")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/sofa/findAll")).build())
.build();
}

Expand Down Expand Up @@ -135,7 +135,7 @@ public ShenYuScenarioSpec testWithUriPathPattern() {
.addNotExists(Method.PUT, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -177,7 +177,7 @@ public ShenYuScenarioSpec testWithUriStartWith() {
.addNotExists(Method.PUT, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -217,7 +217,7 @@ public ShenYuScenarioSpec testWithEndWith() {
.addNotExists(Method.PUT, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists("/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -264,7 +264,7 @@ public ShenYuScenarioSpec testWithMethodGet() {
.addNotExists(Method.PUT, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, "/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -311,7 +311,7 @@ public ShenYuScenarioSpec testWithMethodPost() {
.addNotExists(Method.PUT, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, "/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -358,7 +358,7 @@ public ShenYuScenarioSpec testWithMethodPut() {
.addNotExists(Method.POST, "/grpc/findAll")
.addNotExists(Method.DELETE, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, "/grpc/findAll")).build())
.build();
}

Expand Down Expand Up @@ -405,7 +405,7 @@ public ShenYuScenarioSpec testWithMethodDelete() {
.addNotExists(Method.POST, "/grpc/findAll")
.addNotExists(Method.PUT, "/grpc/findAll")
.build())
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, "/grpc/findAll")).build())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private ShenYuScenarioSpec testDivideWithUriEquals() {
.addNotExists("/get")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(ANYTHING)).build())
.build();
}

Expand Down Expand Up @@ -123,7 +123,7 @@ public ShenYuScenarioSpec testDivideWithUriPathPattern() {
.addExists(Method.DELETE, ANYTHING + "/xx/yy")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(ANYTHING + "/xx/yyy")).build())
.build();
}

Expand Down Expand Up @@ -160,7 +160,7 @@ public ShenYuScenarioSpec testDivideWithUriStartWith() {
.addExists(Method.DELETE, ANYTHING + "/xx/yy")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(ANYTHING + "/xx")).build())
.build();
}

Expand Down Expand Up @@ -199,7 +199,7 @@ public ShenYuScenarioSpec testDivideWithEndWith() {
.addVerifier(Method.DELETE, "/status/200", isEmptyOrNullString())
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(ANYTHING + "/200")).build())
.build();
}

Expand Down Expand Up @@ -243,7 +243,7 @@ public ShenYuScenarioSpec testDivideWithMethodGet() {
.addNotExists(Method.GET, "/get")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.GET, ANYTHING)).build())
.build();
}

Expand Down Expand Up @@ -287,7 +287,7 @@ public ShenYuScenarioSpec testDivideWithMethodPost() {
.addNotExists(Method.POST, "/get")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.POST, ANYTHING)).build())
.build();
}

Expand Down Expand Up @@ -331,7 +331,7 @@ public ShenYuScenarioSpec testDivideWithMethodPut() {
.addNotExists(Method.PUT, "/get")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.PUT, ANYTHING)).build())
.build();
}

Expand Down Expand Up @@ -375,7 +375,7 @@ public ShenYuScenarioSpec testDivideWithMethodDelete() {
.addNotExists(Method.DELETE, "/get")
.build()
)
.afterEachSpec(ShenYuAfterEachSpec.DEFAULT)
.afterEachSpec(ShenYuAfterEachSpec.builder().deleteWaiting(notExists(Method.DELETE, ANYTHING)).build())
.build();
}
}
Loading

0 comments on commit 4b0025a

Please sign in to comment.