@@ -13,6 +13,7 @@ The following guide outlines the basics of how to get involved.
1313 * [ Issues to Track Changes] ( #issues-to-track-changes )
1414 * [ Opening a Pull Request] ( #opening-a-pull-request )
1515 * [ Reporting Issues] ( #reporting-issues )
16+ * [ Running tests] ( #running-tests )
1617* [ Project Communication] ( #project-communication )
1718 * [ Community Forums] ( #community-forums )
1819 * [ Using GitHub Issues and Community Forums] ( #using-github-issues-and-community-forums )
@@ -115,6 +116,75 @@ To report a security issue, please **DO NOT** start by filing a public issue
115116or posting to the forums; instead send a private email to
116117117118
119+ ### Running tests
120+
121+ We have a variety of different testing configurations:
122+
123+ #### test
124+
125+ Standard test target for the majority of our tests; and the standard way of running tests
126+ in gradle ` ./gradlew test `
127+
128+ #### destructiveTest
129+
130+ Some tests have to work with global state in FDB, and need to wipe the entire database
131+ while running (or in ` @Before* ` /` @After* ` ). Those tests are annotated with ` @Tag(Tags.WipesFDB) ` ,
132+ and are only run when you do ` ./gradlew destructiveTest `
133+
134+ #### performanceTest
135+
136+ For tests that gather performance numbers, and aren't focused on correctness.
137+ We don't currently run these in any sort of regular cadence, or automatically, but once written,
138+ it's valuable to keep the code, and run again if you touch the associated production code. These tests are annotated
139+ with ` @Tag(Tags.Performance) ` and can be run with ` ./gradlew performanceTest ` .
140+
141+ #### quickTest
142+
143+ For tests that use ` @YamlTest ` , they generally run with a mixture of different configurations
144+ (e.g. force continuations / external servers). The ` quickTest ` target runs just the embedded
145+ configuration, and is most useful when you are developing new features & tests to make sure
146+ it works in an ` Embedded ` configuration without having to run the failing test a bunch of times for the other configurations.
147+ This can be run with ` ./gradlew quickTest `
148+
149+ #### rpcTest
150+
151+ Similar to ` quickTest ` above, except instead of running with an
152+ ` EmbeddedRelationalConnection ` it runs against JDBC-In-Process, which can be helpful if
153+ you are working on an aspect of the RPC protocol. This can be run with ` ./gradlew rpcTest `
154+
155+ #### singleVersionTest
156+
157+ For tests that use ` @YamlTest ` , this will run all the tests with the test connecting just
158+ to multiple external servers of the same version (unlike its normal behavior which is to alternate between the
159+ external server and the current embedded connection).
160+ This can be run with ` ./gradlew singleVersionTest `
161+
162+ #### Nightly
163+
164+ We have a [ nightly action] ( https://github.com/FoundationDB/fdb-record-layer/actions/workflows/nightly.yml )
165+ that we run every night, and include tests that are exceptionally slow (annotated with ` @SuperSlow ` ) or have
166+ randomness (ideally using ` RandomizedTestUtils ` ).
167+
168+ To mimic the test run in our nightly GitHub action you'll need to attach the following properties, but
169+ you don't always need all of them. You can add this to a standard ` ./gradlew test ` run.
170+
171+ - ` -Ptests.nightly ` :
172+ - It will gnore failures (since these tests are more likely to be flaky, we want to make sure we run all tests in all
173+ sub modules, and not abort if an early one fails.
174+ - It will run tests that are annotated with ` @SuperSlow ` , which have a higher timeout of 20 minutes.
175+ - It will run test parameters that are wrapped in ` TestConfigurationUtils.onlyNightly `
176+ - ` -Ptests.includeRandom ` :
177+ - It will include tests tagged with ` @Tag(Tags.Random) `
178+ - It will set the system locale to a randomly chosen one (to help catch issues where we assume the default locale is
179+ ` en-US ` )
180+ - ` -Ptests.iterations=2 ` : For tests using ` RandomizedTestUtils ` to generate random seeds, this specifies the number of
181+ seeds to use. If ` -Ptests.includeRandom ` is not set, it still won't add any random seeds. This defaults to ` 0 ` .
182+
183+
184+ Note: We also utilize the ` lucene-test-framework ` to get additional coverage of our file format extensions and directory.
185+ Those tests have randomness, but also use JUnit4, unlike all of our tests which use JUnit5. We translate the randomness
186+ controls above into the appropriate properties so that it has matching behavior.
187+
118188## Project Communication
119189
120190### Community Forums
0 commit comments