File tree Expand file tree Collapse file tree 4 files changed +38
-7
lines changed Expand file tree Collapse file tree 4 files changed +38
-7
lines changed Original file line number Diff line number Diff line change @@ -152,10 +152,28 @@ task verifyVersions {
152152 }
153153}
154154
155+ /*
156+ * When adding backcompat behavior that spans major versions, temporarily
157+ * disabling the backcompat tests is necessary. This flag controls
158+ * the enabled state of every bwc task. It should be set back to true
159+ * after the backport of the backcompat code is complete.
160+ */
161+ allprojects {
162+ ext. bwc_tests_enabled = true
163+ }
164+
165+ task verifyBwcTestsEnabled {
166+ doLast {
167+ if (project. bwc_tests_enabled == false ) {
168+ throw new GradleException (' Bwc tests are disabled. They must be re-enabled after completing backcompat behavior backporting.' )
169+ }
170+ }
171+ }
172+
155173task branchConsistency {
156174 description ' Ensures this branch is internally consistent. For example, that versions constants match released versions.'
157175 group ' Verification'
158- dependsOn verifyVersions
176+ dependsOn verifyVersions, verifyBwcTestsEnabled
159177}
160178
161179subprojects {
Original file line number Diff line number Diff line change @@ -79,14 +79,18 @@ for (Version version : indexCompatVersions) {
7979 dependsOn = [upgradedClusterTest]
8080 }
8181
82- bwcTest. dependsOn(versionBwcTest)
82+ if (project. bwc_tests_enabled == false ) {
83+ bwcTest. dependsOn(versionBwcTest)
84+ }
8385}
8486
8587test. enabled = false // no unit tests for rolling upgrades, only the rest integration test
8688
8789// basic integ tests includes testing bwc against the most recent version
8890task integTest {
89- dependsOn = [" v${ indexCompatVersions[-1]} #bwcTest" ]
91+ if (project. bwc_tests_enabled) {
92+ dependsOn = [" v${ indexCompatVersions[-1]} #bwcTest" ]
93+ }
9094}
9195
9296check. dependsOn(integTest)
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 @@ -95,17 +95,22 @@ for (Version version : wireCompatVersions) {
9595 }
9696
9797 Task versionBwcTest = tasks. create(name : " ${ baseName} #bwcTest" ) {
98+ enabled = project. bwc_tests_enabled
9899 dependsOn = [upgradedClusterTest]
99100 }
100101
101- bwcTest. dependsOn(versionBwcTest)
102+ if (project. bwc_tests_enabled) {
103+ bwcTest. dependsOn(versionBwcTest)
104+ }
102105}
103106
104107test. enabled = false // no unit tests for rolling upgrades, only the rest integration test
105108
106109// basic integ tests includes testing bwc against the most recent version
107110task integTest {
108- dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
111+ if (project. bwc_tests_enabled) {
112+ dependsOn = [" v${ wireCompatVersions[-1]} #bwcTest" ]
113+ }
109114}
110115
111116check. dependsOn(integTest)
You can’t perform that action at this time.
0 commit comments