File tree Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Expand file tree Collapse file tree 3 files changed +32
-5
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,28 @@ task verifyVersions {
141141 }
142142}
143143
144+ /*
145+ * When adding backcompat behavior that spans major versions, temporarily
146+ * disabling the backcompat tests is necessary. This flag controls
147+ * the enabled state of every bwc task. It should be set back to true
148+ * after the backport of the backcompat code is complete.
149+ */
150+ allprojects {
151+ ext. bwc_tests_enabled = true
152+ }
153+
154+ task verifyBwcTestsEnabled {
155+ doLast {
156+ if (project. bwc_tests_enabled == false ) {
157+ throw new GradleException (' Bwc tests are disabled. They must be re-enabled after completing backcompat behavior backporting.' )
158+ }
159+ }
160+ }
161+
144162task branchConsistency {
145163 description ' Ensures this branch is internally consistent. For example, that versions constants match released versions.'
146164 group ' Verification'
147- dependsOn verifyVersions
165+ dependsOn verifyVersions, verifyBwcTestsEnabled
148166}
149167
150168subprojects {
Original file line number Diff line number Diff line change @@ -51,14 +51,18 @@ for (Version version : wireCompatVersions) {
5151 dependsOn = [mixedClusterTest]
5252 }
5353
54- bwcTest. dependsOn(versionBwcTest)
54+ if (project. bwc_tests_enabled) {
55+ bwcTest. dependsOn(versionBwcTest)
56+ }
5557}
5658
5759test. enabled = false // no unit tests for rolling upgrades, only the rest integration test
5860
5961// basic integ tests includes testing bwc against the most recent version
6062task integTest {
61- dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
63+ if (project. bwc_tests_enabled) {
64+ dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
65+ }
6266}
6367
6468check. dependsOn(integTest)
Original file line number Diff line number Diff line change @@ -90,17 +90,22 @@ for (Version version : wireCompatVersions) {
9090 }
9191
9292 Task versionBwcTest = tasks. create(name : " ${ baseName} #bwcTest" ) {
93+ enabled = project. bwc_tests_enabled
9394 dependsOn = [upgradedClusterTest]
9495 }
9596
96- bwcTest. dependsOn(versionBwcTest)
97+ if (project. bwc_tests_enabled) {
98+ bwcTest. dependsOn(versionBwcTest)
99+ }
97100}
98101
99102test. enabled = false // no unit tests for rolling upgrades, only the rest integration test
100103
101104// basic integ tests includes testing bwc against the most recent version
102105task integTest {
103- dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
106+ if (project. bwc_tests_enabled) {
107+ dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
108+ }
104109}
105110
106111check. dependsOn(integTest)
You can’t perform that action at this time.
0 commit comments