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

JsonOutputProcess #7532

Open
miguelmaso opened this issue Sep 27, 2020 · 3 comments
Open

JsonOutputProcess #7532

miguelmaso opened this issue Sep 27, 2020 · 3 comments

Comments

@miguelmaso
Copy link
Contributor

Description
As pointed in #3766 some output processes like JsonOutputProcess doesn't implement IsOutputStep neither PrintOutput methods and it prints in the ExecuteFinalizeSolutionStep.
This process and FromJsonCheckResultProcess are very useful for testing. But due to this design JsonOutputProcess can't generate the reference files to test a process which execute important tasks in the ExecuteBeforeOutputStep method.

@philbucher
Copy link
Member

@miguelmaso I don't follow, the JsonOutputProcess itself doesn't do anything except writing a reference solution, which doesn't matter when to write it as long as it happens last
can you show your configuration to understand better the problem?

@miguelmaso
Copy link
Contributor Author

In the AnalysisStage the OutputSolutionStep comes after FinalizeSolutionStep but it isn't an issue.
The main problem is that in a test there aren't output_processes (JsonOutputProcess and FromJsonCheckResultProcess should be output processes). If there aren't output processes, the ExecuteBeforeOutputStep won't be never called and hence it can't be tested.
In #7540 I did a workaround with the ProjectParameters to overcome this issue:

  • I call a base output_process to enforce the output step
  • The end_time is two times the time_step: in the first step, the ExecuteBeforeOutputStep to be tested is executed. In the second step, the FromJsonCheckResultProcess is executed and there is an extra call of ExecuteBeforeOutputStep

@loumalouomega
Copy link
Member

I apologize for any inconsistency in the design, I would correct it once an agreement is reached

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants