Skip to content

macOS test failure: AllowedShapeTests/S2ClosestEdgeQueryShapeTest.CircleEdges/0 #582

@jmr

Description

@jmr

https://github.com/google/s2geometry/actions/runs/24877943944/job/72838948350

[ RUN      ] AllowedShapeTests/S2ClosestEdgeQueryShapeTest.CircleEdges/0
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
W0000 00:00:1777016343.123334  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.127424  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.408202  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.414897  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.435410  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.435775  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.724929  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.727098  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.751163  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.753429  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.879353  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.882055  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016343.951422  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.158274  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.731976  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.734390  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.767139  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.768507  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.787545  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016344.928793  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016345.559465  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016345.560303  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016346.327922  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016346.526001  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016347.492848  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016347.493791  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016347.498565  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016347.503657  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016348.036198  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
W0000 00:00:1777016348.167899  118362 s2closest_edge_query_base.h:653] Returning all edges (max_results/max_distance not set)
Missing distance = 175.5105154, id = 0:50
/Users/runner/work/s2geometry/s2geometry/src/s2/s2closest_edge_query_test.cc:710: Failure
Value of: CheckDistanceResults(ConvertResults(expected), ConvertResults(actual), query->options().max_results(), query->options().max_distance(), query->options().max_error())
  Actual: false
Expected: true
max_results=2, max_distance=inf, max_error=0.0000000

[  FAILED  ] AllowedShapeTests/S2ClosestEdgeQueryShapeTest.CircleEdges/0, where GetParam() = -1 (6399 ms)
[----------] 1 test from AllowedShapeTests/S2ClosestEdgeQueryShapeTest (6399 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (6399 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] AllowedShapeTests/S2ClosestEdgeQueryShapeTest.CircleEdges/0, where GetParam() = -1

static S2ClosestEdgeQuery::Result TestFindClosestEdges(
S2ClosestEdgeQuery::Target* target, S2ClosestEdgeQuery* query,
absl::flat_hash_set<int> allowed_shapes = {}) {
vector<S2ClosestEdgeQuery::Result> expected, actual;
query->mutable_options()->set_use_brute_force(true);
GetClosestEdges(target, query, &expected, allowed_shapes);
// If we were restricted to some set of shape ids, make sure that the results
// are only from that set.
if (!allowed_shapes.empty()) {
for (const auto& result : expected) {
EXPECT_TRUE(allowed_shapes.contains(result.shape_id()));
}
}
query->mutable_options()->set_use_brute_force(false);
GetClosestEdges(target, query, &actual, allowed_shapes);
EXPECT_TRUE(CheckDistanceResults(ConvertResults(expected),
ConvertResults(actual),
query->options().max_results(),
query->options().max_distance(),
query->options().max_error()))
<< "max_results=" << query->options().max_results()
<< ", max_distance=" << query->options().max_distance()
<< ", max_error=" << query->options().max_error();

TEST_P(S2ClosestEdgeQueryShapeTest, CircleEdges) {
absl::BitGen bitgen(S2Testing::MakeTaggedSeedSeq(
"CIRCLE_EDGES", absl::LogInfoStreamer(__FILE__, __LINE__).stream()));
TestWithIndexFactory(s2testing::RegularLoopShapeIndexFactory(), kNumIndexes,
kNumEdges, kNumQueries, allowed_shapes(), bitgen);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions