kgyrtkirk commented on code in PR #18236: URL: https://github.com/apache/druid/pull/18236#discussion_r2204003885
########## dev/validate-junit5-usage: ########## @@ -0,0 +1,37 @@ +#!/bin/bash + +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#-------------------------------------------------------------------- + +# Utility script for running the new integration tests, since the Maven +# commands are unwieldy. Allows straightforward usage of ITs on the desktop +# and in various build scripts. Handles configuration of various kinds. + +set -e + +git grep junit-jupiter-engine '**/pom.xml' | cut -d: -f1 | while read pom ;do + + m=`dirname $pom` + hasj4=`git grep org.junit.Test $m | head -n 1 | wc -l` + hasVintage=`git grep junit-vintage-engine $m|head -n 1 | wc -l` + + echo "$m hasj4:$hasj4 hasVintage:$hasVintage" + + if [ "$hasVintage" != "$hasj4" ];then + echo "Module [$m] either needs tests upgraded to junit5 or the vintage engine!" Review Comment: I don't think its beneficial to provide any solutions...the developer should evaluate the situation and select the best option - my message suggested two options how this could be fixed: * upgrade the tests to junit5 - I think this should be preferred * enable compat mode - in which case the PR author should dig out how to do that...it will be pretty easy to get to this commit with a `git log` or `git annotate` and a `git show` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
