ADR 0127
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (tsan) (push) Successful in 10m11s
Foundation / checks (client) (push) Failing after 14m26s
Foundation / checks (network) (push) Successful in 18m54s
Foundation / checks (checks) (push) Successful in 42m9s
Foundation / checks (postgres) (push) Successful in 43m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (tsan) (push) Successful in 10m11s
Foundation / checks (client) (push) Failing after 14m26s
Foundation / checks (network) (push) Successful in 18m54s
Foundation / checks (checks) (push) Successful in 42m9s
Foundation / checks (postgres) (push) Successful in 43m51s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped
This commit is contained in:
@@ -502,6 +502,38 @@ void crossing_regions(const Files& f) {
|
||||
CHECK(a.phase() == LaunchPhase::failed && world.probes.at(dana).owner == 2);
|
||||
CHECK(db1.claims == region1_claims && db2.claims == region2_claims + 1);
|
||||
}
|
||||
void cellular_birth_without_view(const Files& files) {
|
||||
test::WorldDb world;
|
||||
test::RegionDb control{world, region};
|
||||
const auto owner = account(0xD1);
|
||||
std::vector<std::uint64_t> requests;
|
||||
auto answer = PrimitiveLifeResult::pending;
|
||||
Region r{files, [&](server::RegionSessionsConfig& config) {
|
||||
config.ledger = &control;
|
||||
config.accept_cellular_actions = true;
|
||||
config.create_primitive_life = [&](const AccountId& a, std::uint64_t generation,
|
||||
std::uint64_t id) {
|
||||
CHECK(a == owner && generation != 0);
|
||||
requests.push_back(id);
|
||||
return PrimitiveLifeOutcome{id, answer, 901, 0};
|
||||
};
|
||||
config.query_primitive_life = config.create_primitive_life;
|
||||
}};
|
||||
Client c;
|
||||
CHECK(c.host.connect(RemoteSession::open(r.material({r.grant(owner, 1)}), true)));
|
||||
CHECK(c.until(r, [&] { return requests.size() >= 2; }));
|
||||
auto& remote = *c.host.session();
|
||||
CHECK(requests[0] == requests[1] && !remote.cellular_play().can_restart() &&
|
||||
!remote.cellular_perception());
|
||||
answer = PrimitiveLifeResult::insufficient_funding;
|
||||
CHECK(c.until(r, [&] { return remote.cellular_play().can_restart(); }));
|
||||
CHECK(!remote.cellular_play().fresh() &&
|
||||
remote.status().cellular_action.find("nursery lacks resources") != std::string::npos);
|
||||
CHECK(remote.restart_cellular() && !remote.restart_cellular());
|
||||
answer = PrimitiveLifeResult::no_placement;
|
||||
CHECK(c.until(r, [&] { return remote.cellular_play().can_restart(); }));
|
||||
CHECK(requests.back() != requests.front() && !remote.cellular_perception());
|
||||
}
|
||||
// Real RemoteSession over QUIC; the fixture records authority answers without simulating biology.
|
||||
void cellular_v10(const Files& files) {
|
||||
using namespace evo::client_app;
|
||||
@@ -680,6 +712,7 @@ int main() try {
|
||||
}
|
||||
crossing_regions(files);
|
||||
cellular_v10(files);
|
||||
cellular_birth_without_view(files);
|
||||
std::filesystem::remove_all(files.dir);
|
||||
std::puts("client remote session tests passed");
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user