-
Notifications
You must be signed in to change notification settings - Fork 125
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
Unit Tests #149
Comments
i guess separating modules in terms of version could be help for this situation. |
Here is an idea about why the Since Perhaps even a slightest delay after the start could allow join to finally block?
Such that "Done!" should appear in the logs between "pre-join" and "post-join". Might be able to get by with a value of less than 50 ms, such as 5 ms or even less, or it may need to be more. Personally, I'd probably bump that up to a higher value to accommodate slow/old hardware/vms when using it in a real unit test environment. I just wanted to illustrate with the 50 ms that its probably only needing a very short sleep time to give the vm a chance to create and get the thread started. Not sure it this is exactly what is going on, but I just thought I'd throw my idea in to the ring. ;) PS... My project has been using XSeries for well over a year now, but it is not included in any of your dependencies due to limitations of the use of gradle, of which is not supported in git's dependency reporting. Anyway, this is an excellent resource that has allowed me to scrap tons of old internal code "trying" to deal with block compatibility. Since the project is over 7+ years old, it became a nightmare to support newer blocks, especially with the flattening. So XSeries has really allowed me to focus on the plugin, and not the blocks, which is greatly appreciated! Thanks! :) |
There are currently some issues with the unit tests that must be solved, most of them has to do with Maven. Also, some test related classes are left hanging around intentionally just in case they are needed in the future.
Right now there is a master profile
tester
which handles tests in general, and subsidiary profiles for running the unit tests on different Minecraft versions (named after the minor version18
,17
,16
, etc.)So you can just run these tests with a simple Maven command:
mvn clean package -Ptester,18
The first problem is that running these tests for lower versions like 1.16 won't work because surefire will use 1.16 jar to compile and test.
This will obviously fail because the XSeries library is designed to be compiled on the latest version and handle older versions during runtime.
I need to find a way to compile the tests using the latest version of Spigot, but test/run them using a lower version. I tried playing around with options like <dependenciesToScan> without luck.
Another insignificant issue is that I can't find a way to run all these profiles one after another automatically to test the library for all the versions.
And the last abomination is this. Without this delay the server won't completely load:
XSeries/src/test/DummyAbstractServer.java
Line 165 in 7477ef5
The text was updated successfully, but these errors were encountered: