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

Example for the MuTalk chapter and small changes #121

Merged
merged 7 commits into from
Nov 5, 2024

Conversation

DurieuxPol
Copy link
Collaborator

Package MuTalk-Examples contains a class and a test class used for the MuTalk chapter, and executable scripts as extension methods in MTAnalysis class side.

Small changes include :

  • don't log the mutant generation if the mutations are already given (mutations are not nil)
  • heat map color palette changed to red - yellow - green
  • setter for mtAnalysis in MTUtilityAnalysis class

@DurieuxPol DurieuxPol requested a review from guillep October 23, 2024 15:14
@guillep
Copy link
Contributor

guillep commented Oct 25, 2024

Salut @DurieuxPol there is a broken test in the P11 build, I re-ran it and it failed again, can you check it? The P9 build is broken because of a separate thing, we should fix it separately

@DurieuxPol
Copy link
Collaborator Author

I think I found the issue. It's about this test:

testWithNoTimeForMutantsRunsNoMutants

	| duration analysisTime result |
	"Divide duration by 4 to make sure we never have time for mutants"
	duration := self fixedAnalysisTime / 4.
	analysisTime := [ result := self runAnalysisForDuration: duration ]
		                timeToRun.

	"We never treat mutants because the budget was exceeded running the initial test run, coverage analysis, etc"
	self assert: result numberOfEvaluatedMutants equals: 0

When the test breaks it's because the analysis had time to evaluate mutants. The initial test run, coverage analysis etc don't always take the same time, and sometimes I guess it's way faster the 2nd time (when we compute analysisTime) than the 1st time (when we comput duration), so dividing by 4 is not always enough.
I suggest dividing by 10 to make sure the analysis doesn't have time to evaluate mutants (or at least to leave less chances).

@DurieuxPol
Copy link
Collaborator Author

DurieuxPol commented Nov 4, 2024

And the issue doesn't seem to be specific to Pharo 11, I had it also on Pharo 12. It's just quite random given its nature.

@guillep
Copy link
Contributor

guillep commented Nov 5, 2024

Hmm I think it's worth trying with a smaller time. But it's not a solution in the long term :)
Let's try.

In the future if this persists and we don't find a solution maybe it's good to remove those tests?

@DurieuxPol
Copy link
Collaborator Author

I'll do that.
I think the issue is also caused by the fact that the analysis runtime is only a few milliseconds, so dividing it by 4, 10 or whatever doesn't make a big change. If the issue persists in the futur a solution could be to use bigger classes for the analysis, so that dividing the runtime reduces more significantly the duration.

@guillep guillep merged commit 0288626 into pharo-contributions:master Nov 5, 2024
3 of 4 checks passed
@guillep
Copy link
Contributor

guillep commented Nov 5, 2024

Thanks Pol!

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

Successfully merging this pull request may close these issues.

2 participants