Skip to content

Unit Tests #149

@CryptoMorin

Description

@CryptoMorin

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 version 18, 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:

Thread.sleep(2000L);

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestopinionsExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions