Terasology / ModuleTestingEnvironment

3 stars 15 forks source link

feat: async functions to make sure blocks/chunks are loaded #66

Closed keturn closed 2 years ago

keturn commented 2 years ago

This provides a more powerful version of the forceAndWaitForGeneration helper method. The new makeBlocksRelevant and makeChunksRelevant methods load all required chunks to cover the given region.

Depends on:

Reviewers:

keturn commented 2 years ago

The required engine PR was merged, so this does build now.

I'm afraid that as much fun as I had writing it, I don't expect this is readable/maintainable for most people: https://github.com/Terasology/ModuleTestingEnvironment/blob/cc33e468c35f8099d7f9d930868caa298a32fd40/src/main/java/org/terasology/moduletestingenvironment/ChunkRegionFuture.java#L53-L62
so I think we had better find another way to write that without the higher-order function gymnastics before merging this one.

keturn commented 2 years ago

amidst all the distractions in the test log, there is this:

[Chunk-Processing-Reactor] ERROR o.t.e.w.c.p.​Chunk­Processing­Pipeline - Cannot run java.​util.​concurrent.​Executor­Completion­Service$​Queueing­Future​@6a1cf258 because queue is full

keturn commented 2 years ago

huh. Only saw that particular "queue full" message once; the later test runs don't have it.

Now this is in the unfortunate position of Works On My Machine, Fails in CI. Which I don't like, but it's also status quo—that's why we have @Tag("MteTest").

While I'd be very happy to see that fixed, I would also be okay with merging this without the Integration Tests stage passing, so that other tests can start using these new functions.

keturn commented 2 years ago

new MTE makeBlocksRelevant methods

keturn commented 2 years ago

@DarkWeird when I mentioned “we haven't yet fixed the problems with MTE tests on our CI system,” I was referring to the way the Integration Tests have not been passing for a long time: https://jenkins.terasology.io/teraorg/job/Terasology/job/Modules/job/M/job/ModuleTestingEnvironment/job/develop/

keturn commented 2 years ago

I forwarded some questions about what to do about the JavaDoc to #documentation.