Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yaml test option to force continuations #3075

Merged
merged 16 commits into from
Feb 5, 2025

Conversation

ohadzeliger
Copy link
Contributor

@ohadzeliger ohadzeliger commented Jan 29, 2025

This PR adds the ability to force maxRows:1 onto YAML tests that do not otherwise specify the maxRows. The forced maxRows is set to 1, which means that every test that has more than 0 rows back will result in a continuation being issued and another request being made. The tests will be run in a separate and independent run, not impacting any of the existing coverage. The existing assertions will be used without modification to verify the results of the modified tests: The result set returned to the Matcher is an aggregate result set that contains all the "one liner" result sets returned from the query requests.
Another new feature is the ability to distinguish between marrows:0 and not having maxRows specified. The former will prevent the forcing of continuations while maintaining the "no limit" semantics. The latter will use the default "no limit" normally but will allow the forcing of continuations when running in that mode.

@FoundationDB FoundationDB deleted a comment from foundationdb-ci Jan 30, 2025
@FoundationDB FoundationDB deleted a comment from foundationdb-ci Jan 30, 2025
@FoundationDB FoundationDB deleted a comment from foundationdb-ci Jan 30, 2025
@foundationdb-ci
Copy link
Contributor

Result of fdb-record-layer-pr on Linux CentOS 7

  • Commit ID: 516b79f
  • Duration 0:56:33
  • Result: ❌ FAILED
  • Error: Error while executing command: ./gradlew --no-daemon --console=plain -b ./build.gradle build destructiveTest -PcoreNotStrict -PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of fdb-record-layer-pr on Linux CentOS 7

  • Commit ID: 51a466b
  • Duration 0:56:49
  • Result: ❌ FAILED
  • Error: Error while executing command: ./gradlew --no-daemon --console=plain -b ./build.gradle build destructiveTest -PcoreNotStrict -PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport. Reason: exit status 1
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@foundationdb-ci
Copy link
Contributor

Result of fdb-record-layer-pr on Linux CentOS 7

  • Commit ID: 44c596f
  • Duration 0:57:33
  • Result: ✅ SUCCEEDED
  • Error: N/A
  • Build Log terminal output (available for 30 days)
  • Build Workspace zip file of the working directory (available for 30 days)

@ohadzeliger ohadzeliger marked this pull request as ready for review January 31, 2025 15:35
import java.util.Optional;
import java.util.function.Supplier;

@SuppressWarnings({"PMD.GuardLogStatement"}) // It already is, but PMD is confused and reporting error in unrelated locations.
public final class YamlExecutionContext {
public static final String OPTION_FORCE_CONTINUATIONS = "optionForceContinuations";
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to allow the compiler to do more protecting here, and have an object with setters, e.g.

new Options().setForceContinuations(true)

Or do you see some reason that this may have to pass options along that it is unaware of?

Copy link
Contributor Author

@ohadzeliger ohadzeliger Feb 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a pattern that we can use to enforce types by creating a generic-typed enum constants. Let me see if it creates a better experience.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll get that done in a followup in an attempt to get this PR in sooner to get coverage increase

}

@Override
@Disabled("Infinite continuation loop")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of just comments, should these reference issues?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

yaml-tests/src/test/java/MultiServerJDBCYamlTests.java Outdated Show resolved Hide resolved
@ohadzeliger ohadzeliger changed the title Set maxrows to 1 Yaml test option to force continuations Feb 5, 2025
@ohadzeliger ohadzeliger merged commit 51ab5c8 into FoundationDB:main Feb 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants