Skip to content

Commit c8dfdd9

Browse files
committed
Enable force continuations on two test cases to demonstrate that they fail
1 parent 62e5b84 commit c8dfdd9

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/YamlTestExtension.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private Stream<YamlTestConfig> localConfigs(final boolean mixedModeOnly, final b
134134
if (mixedModeOnly || singleExternalVersionOnly) {
135135
return Stream.of();
136136
} else {
137-
return Stream.of(new EmbeddedConfig(clusterFile), new JDBCInProcessConfig(clusterFile));
137+
return Stream.of(new EmbeddedConfig(clusterFile), new ForceContinuations(new EmbeddedConfig(clusterFile)), new JDBCInProcessConfig(clusterFile));
138138
}
139139
}
140140

yaml-tests/src/main/java/com/apple/foundationdb/relational/yamltests/command/QueryExecutor.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,15 @@ private Object executeStatementAndCheckCacheIfNeeded(@Nonnull Statement s, final
148148
preMetricCollector.getCountsForCounter(RelationalMetric.RelationalCount.PLAN_CACHE_TERTIARY_HIT) : 0;
149149
final var toReturn = executeStatementAndCheckForceContinuations(s, statementHasQuery, queryString, connection, maxRows);
150150
final var postMetricCollector = connection.getMetricCollector();
151-
final var postValue = postMetricCollector.hasCounter(RelationalMetric.RelationalCount.PLAN_CACHE_TERTIARY_HIT) ?
152-
postMetricCollector.getCountsForCounter(RelationalMetric.RelationalCount.PLAN_CACHE_TERTIARY_HIT) : 0;
153-
final var planFound = preMetricCollector != postMetricCollector ? postValue == 1 : postValue == preValue + 1;
154-
if (!planFound) {
155-
reportTestFailure("‼️ Expected to retrieve the plan from the cache at line " + lineNumber);
156-
} else {
157-
logger.debug("🎁 Retrieved the plan from the cache!");
151+
if (postMetricCollector != null) {
152+
final var postValue = postMetricCollector.hasCounter(RelationalMetric.RelationalCount.PLAN_CACHE_TERTIARY_HIT) ?
153+
postMetricCollector.getCountsForCounter(RelationalMetric.RelationalCount.PLAN_CACHE_TERTIARY_HIT) : 0;
154+
final var planFound = preMetricCollector != postMetricCollector ? postValue == 1 : postValue == preValue + 1;
155+
if (!planFound) {
156+
reportTestFailure("‼️ Expected to retrieve the plan from the cache at line " + lineNumber);
157+
} else {
158+
logger.debug("🎁 Retrieved the plan from the cache!");
159+
}
158160
}
159161
return toReturn;
160162
}

yaml-tests/src/test/resources/enum.yamsql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ test_block:
156156
- query: SELECT * From TABLE_B where "mood" = 'CONFUSED'
157157
- explain: "ISCAN(B$MOOD [EQUALS promote(@c8 AS ENUM<JOYFUL(0), HAPPY(1), RELAXED(2), INDIFFERENT(3), CONFUSED(4), SAD(5), ANXIOUS(6), ANGRY(7)>)])"
158158
# Disable force_continuations on this plan until we resolve: https://github.com/FoundationDB/fdb-record-layer/issues/3734
159-
- maxRows: 0
159+
# - maxRows: 0
160160
- unorderedResult: [{2, 'bar', 'CONFUSED'},
161161
{11, 'plugh', 'CONFUSED'}]
162162
-
163163
- query: SELECT * From TABLE_B where "mood" > 'INDIFFERENT'
164164
- explain: "ISCAN(B$MOOD [[GREATER_THAN promote(@c8 AS ENUM<JOYFUL(0), HAPPY(1), RELAXED(2), INDIFFERENT(3), CONFUSED(4), SAD(5), ANXIOUS(6), ANGRY(7)>)]])"
165165
# Disable force_continuations on this plan until we resolve: https://github.com/FoundationDB/fdb-record-layer/issues/3734
166-
- maxRows: 0
166+
# - maxRows: 0
167167
- unorderedResult: [{2, 'bar', 'CONFUSED'},
168168
{4, 'qux', 'ANGRY'},
169169
{7, 'grault', 'ANXIOUS'},

0 commit comments

Comments
 (0)