Skip to content

Conversation

@mawiesne
Copy link
Contributor

What's in the PR

How to test manually

  • mvn clean verify -Ptest-e2e-tools

Automatic testing

  • PR includes unit tests

Documentation

  • PR updates documentation

- closes #433
- fixes bug/glitch in DataMachineFiles#line99
- fixes bug/glitch in TimeMachineFiles#line49
- removes spammy, oldskool FileMemoryLogger from default ILogger config in AbstractEnvironmentFactory as the same behavior (log 'files') can be achieved via some external config
@mawiesne mawiesne added this to the 2.0.2 milestone Jan 17, 2026
@mawiesne mawiesne requested review from reckart and rzo1 January 17, 2026 13:54
@mawiesne mawiesne self-assigned this Jan 17, 2026
@rzo1 rzo1 requested a review from Copilot January 17, 2026 13:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds JUnit tests for DataMachine and TimeMachine components, fixes two bugs in copy/error handling, and removes the FileMemoryLogger from default logging configuration.

Changes:

  • Adds comprehensive JUnit test suites for DataMachine and TimeMachine factory and domain classes
  • Fixes critical bug in TimeMachineFiles copy constructor where pageLinksFile was incorrectly assigned metaHistoryFile value
  • Fixes bug in DataMachineFiles where error message referenced wrong variable
  • Updates Slf4JLogger to log Throwables at error level instead of info level
  • Removes FileMemoryLogger from default ILogger configuration in AbstractEnvironmentFactory
  • Adds input validation and defensive null checks in Files and DataMachineFiles

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
dkpro-jwpl-wikimachine/src/main/java/org/dkpro/jwpl/wikimachine/factory/AbstractEnvironmentFactory.java Removes FileMemoryLogger from default logger configuration, adds explanatory comment
dkpro-jwpl-wikimachine/src/main/java/org/dkpro/jwpl/wikimachine/domain/Files.java Adds null/blank validation for setOutputDirectory with defensive behavior when path is not a directory
dkpro-jwpl-wikimachine/src/main/java/org/dkpro/jwpl/wikimachine/debug/Slf4JLogger.java Changes Throwable logging from info to error level
dkpro-jwpl-timemachine/src/main/java/org/dkpro/jwpl/timemachine/domain/TimeMachineFiles.java Fixes copy constructor bug, removes blank line in setTimestamp, improves formatting
dkpro-jwpl-datamachine/src/main/java/org/dkpro/jwpl/datamachine/domain/DataMachineFiles.java Fixes error message to reference correct variable, adds null/blank validation, adds defensive null checks in getters
dkpro-jwpl-timemachine/src/test/java/org/dkpro/jwpl/timemachine/factory/DefaultTimeMachineEnvironmentFactoryTest.java Adds factory tests verifying component instantiation
dkpro-jwpl-timemachine/src/test/java/org/dkpro/jwpl/timemachine/domain/TimeMachineFilesTest.java Adds comprehensive tests for TimeMachineFiles including validation, getters, and copy constructor
dkpro-jwpl-datamachine/src/test/java/org/dkpro/jwpl/datamachine/factory/DefaultDataMachineEnvironmentFactoryTest.java Adds factory tests verifying component instantiation
dkpro-jwpl-datamachine/src/test/java/org/dkpro/jwpl/datamachine/domain/DataMachineFilesTest.java Adds comprehensive tests for DataMachineFiles including validation, getters, and copy constructor
dkpro-jwpl-timemachine/src/test/resources/log4j2.xml Adds log4j2 configuration for test resources
dkpro-jwpl-datamachine/src/test/resources/log4j2.xml Adds log4j2 configuration for test resources
dkpro-jwpl-datamachine/src/test/resources/log4j2.properties Removes old log4j properties file
dkpro-jwpl-timemachine/src/test-e2e/java/org/dkpro/jwpl/timemachine/domain/JWPLTimeMachineE2ETest.java Restructures directory organization for E2E tests

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mawiesne mawiesne merged commit 13c85b9 into master Jan 17, 2026
6 checks passed
@mawiesne mawiesne deleted the 433-Add-basic-set-of-JUnit-tests-for-Data--and-TimeMachine-component branch January 17, 2026 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add basic set of JUnit tests for Data- and TimeMachine component

3 participants