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

Help wanted! Convert Groovy tests to Java #7195

Open
trask opened this issue Nov 16, 2022 · 17 comments
Open

Help wanted! Convert Groovy tests to Java #7195

trask opened this issue Nov 16, 2022 · 17 comments
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome

Comments

@trask
Copy link
Member

trask commented Nov 16, 2022

We've made some initial progress in #7148, #6613, #6537, #6497, #6484, #6486, #6485, #5774, #5688, #5679, #5668, #5660, #5596, #5581, #5521, #5504, #5399, #3768, #3525 (among others)

But there's so much more! 😅

Pick your favorite(s) and help us convert one or two (or ten!)

@trask trask added the contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome label Nov 16, 2022
@trask trask pinned this issue Nov 22, 2022
@trask trask changed the title Convert Groovy tests to Java Convert Groovy tests to Java [help wanted!] Nov 22, 2022
@trask trask changed the title Convert Groovy tests to Java [help wanted!] Help wanted! Convert Groovy tests to Java Nov 22, 2022
trask pushed a commit that referenced this issue Jan 3, 2023
Part of
#7195
Resolves
#7417
Vaadin tests often break with a new version of vaadin. To improve this
tests were change to assert only the traces and spans that are common in
all the versions.
trask pushed a commit that referenced this issue Jan 23, 2023
mateuszrzeszutek pushed a commit that referenced this issue Jan 30, 2023
mateuszrzeszutek pushed a commit that referenced this issue Feb 7, 2023
trask pushed a commit that referenced this issue Feb 27, 2023
Converts apache-httpclient-4.0 unit tests in java. Version 4.0 was using
GuardedBy annotation which was interfering with the test cases, hence
the library version was shifted to 4.1.
#7195
laurit pushed a commit that referenced this issue Mar 11, 2023
laurit pushed a commit that referenced this issue Mar 11, 2023
mateuszrzeszutek pushed a commit that referenced this issue Mar 27, 2023
Related to #7195.

Converts spring data instrumentation tests from groovy to java.
mateuszrzeszutek pushed a commit that referenced this issue Mar 28, 2023
Related to #7195 

Converts Geode test from Groovy to Java.
@jaydeluca
Copy link
Member

Progress Update

We continue to burn down the groovy test files, and at the same time we can see further expansion of the java tests as more instrumentation is added:

java vs groovy

We are approaching the milestone of less than 300 remaining files, with over 250 files converted thus far:

groovy trend

Here is a breakdown of the remaining instrumentation modules to be converted:

Instrumentation Files to be converted
spring 52
jaxrs 37
servlet 23
restlet 22
couchbase 18
aws-sdk 17
ratpack 16
elasticsearch 15
play 15
jaxws 15
vertx 14
mongo 10
jdbc 8
apache-dubbo-2.7 7
jaxrs-client 5
netty 5
apache-httpclient 3
opentelemetry-api 3
grizzly-2.3 3
grails-3.0 3
undertow-1.4 3
kafka 3
internal 2
dropwizard 2
hibernate 1
rediscala-1.8 1
spymemcached-2.12 1
twilio-6.6 1
Total 305
groovy breakdown

@zeitlinger
Copy link
Member

I'll give (some) spring tests a shot

@zeitlinger
Copy link
Member

---------------------------------------------------------------------------------
Language                       files          blank        comment           code
---------------------------------------------------------------------------------
XSD                              406          27232           9758         293467
Java                            4065          46854          34176         248814
HTML                             553           1252           1580         152058
XML                             1181           1800           9778         126077
JSON                              62             50              0          92945
Kotlin                          1526          21083          59440          77275
Groovy                           361           6013           2643          33632

@laurit
Copy link
Contributor

laurit commented Aug 17, 2024

@zeitlinger I think you should exclude build directories

@zeitlinger
Copy link
Member

good point

~/opt/cloc-2.02/cloc --match-d='/(src)/' .
    4728 text files.
    4612 unique files.                                          
     118 files ignored.

github.com/AlDanial/cloc v 2.02  T=4.51 s (1021.5 files/s, 84070.5 lines/s)
---------------------------------------------------------------------------------
Language                       files          blank        comment           code
---------------------------------------------------------------------------------
Java                            3962          45180          33339         237806
Groovy                           360           5992           2323          33562
YAML                              16             44              5           6394
Scala                             34            399            213           2865
Kotlin                            39            481            288           2520
XML                               84            399             80           2158
JSON                               6             49              0           2091
Gradle                            24            294            355           1664

@jaydeluca
Copy link
Member

we've got some serious momentum lately, and we're now below 200 files remaining. thanks @zeitlinger @laurit @shalk and @xiepuhuan!

test file burn down

Remaining modules by file count percentage:

breakdown

instrumentation list sorted by sum of the file sizes:

Key File Count (Sum) File Size
aws-sdk 17 127827
jdbc 8 90890
jaxrs 37 72352
servlet 10 65662
vertx 14 56845
ratpack 16 51932
mongo 10 51661
play 15 48986
restlet 22 38226
jaxws 17 21595
kafka 3 21505
twilio-6.6 1 18936
jaxrs-client 5 16067
spymemcached-2.12 1 15630
undertow-1.4 3 12754
hibernate 1 12167
dropwizard 2 10789
rediscala-1.8 1 3898
grails-3.0 3 3201
internal 2 2603
Total 188 743526

@zeitlinger
Copy link
Member

using cloc

---------------------------------------------------------------------------------
Language                       files          blank        comment           code
---------------------------------------------------------------------------------
Java                            4222          48133          34902         254323
Groovy                           234           3698           1488          21169

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Request makes sense, maintainers probably won't have time, contribution would be welcome
Projects
None yet
Development

No branches or pull requests

5 participants