Exercise client follow for life owner redirects
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 47s
Foundation / checks (tsan) (push) Canceled after 24s
Foundation / checks (ecs) (push) Canceled after 59s
Foundation / checks (client) (push) Successful in 5s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (network) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 47s
Foundation / checks (tsan) (push) Canceled after 24s
Foundation / checks (ecs) (push) Canceled after 59s
This commit is contained in:
@@ -390,6 +390,11 @@ void crossing_regions(const Files& f) {
|
||||
c.neighbours.push_back(
|
||||
{{neighbour, "localhost:" + std::to_string(neighbour_port), std::string{name}},
|
||||
area(neighbour == 1 ? 0 : 10 * m)});
|
||||
c.life_owner_routes = {
|
||||
server::LifeOwnerRoute{
|
||||
RegionAddress{id, "localhost:" + std::to_string(port), std::string{name}}},
|
||||
server::LifeOwnerRoute{RegionAddress{
|
||||
neighbour, "localhost:" + std::to_string(neighbour_port), std::string{name}}}};
|
||||
c.ghost_poll = std::chrono::milliseconds{20};
|
||||
auto made = server::RegionSessions::create(std::move(c));
|
||||
CHECK(made.has_value());
|
||||
@@ -398,14 +403,18 @@ void crossing_regions(const Files& f) {
|
||||
(*made)->set_default_interest({(x0 / m) + 5, 5, 0, 7});
|
||||
return std::move(*made);
|
||||
};
|
||||
// Region 2 listens on a port found by binding a throwaway region first.
|
||||
std::uint16_t port2 = 0;
|
||||
// Reserve both ports using throwaway listeners so each world route is complete.
|
||||
std::uint16_t port1 = 0, port2 = 0;
|
||||
{
|
||||
auto probe = make(2, db2, key2, *key1, 1, 1, 0);
|
||||
auto probe = make(1, db1, key1, *key2, 2, 1, 0);
|
||||
port1 = probe->port();
|
||||
}
|
||||
{
|
||||
auto probe = make(2, db2, key2, *key1, 1, port1, 0);
|
||||
port2 = probe->port();
|
||||
}
|
||||
auto r1 = make(1, db1, key1, *key2, 2, port2, 0);
|
||||
auto r2 = make(2, db2, key2, *key1, 1, r1->port(), port2);
|
||||
auto r1 = make(1, db1, key1, *key2, 2, port2, port1);
|
||||
auto r2 = make(2, db2, key2, *key1, 1, port1, port2);
|
||||
std::uint64_t tick = 100;
|
||||
const auto grants = [&](const AccountId& who, std::uint64_t first) {
|
||||
std::vector<WireGrant> out;
|
||||
@@ -465,13 +474,18 @@ void crossing_regions(const Files& f) {
|
||||
world.probes.at(dana).owner == 2 && s.status().marker_x_mm >= 10'000);
|
||||
a.intention.move_x = 0;
|
||||
// A second client with a newer bundle logs in at region 1 and is redirected to region 2,
|
||||
// where it takes over (the first is superseded).
|
||||
// where it takes over (the first is superseded). The active life owner lookup must
|
||||
// redirect before region 1's durable control claim.
|
||||
world.life_owners[dana] = 2;
|
||||
const auto region1_claims = db1.claims;
|
||||
const auto region2_claims = db2.claims;
|
||||
Client b;
|
||||
CHECK(b.host.connect(RemoteSession::open(material(grants(dana, 20)))));
|
||||
auto& t = *b.host.session();
|
||||
CHECK(
|
||||
pump({&a, &b}, [&] { return t.status().region == 2 && t.status().phase == "connected"; }));
|
||||
CHECK(a.phase() == LaunchPhase::failed && world.probes.at(dana).owner == 2);
|
||||
CHECK(db1.claims == region1_claims && db2.claims == region2_claims + 1);
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user