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

Backport fixed tests #14409

Merged
merged 2 commits into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/Announcements-Core-Tests/WeakAnnouncerTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,6 @@ WeakAnnouncerTest >> benchWeakSubscriptionStatic [
] timeToRun
]

{ #category : #utilities }
WeakAnnouncerTest >> longTestCase [

self timeLimit: 60 seconds
]

{ #category : #tests }
WeakAnnouncerTest >> testNoDeadWeakSubscriptions [
self longTestCase.
Expand Down
13 changes: 9 additions & 4 deletions src/Coverage/CoverageCollectorTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,15 @@ CoverageCollectorTest >> testExample [

| collector coverage |
collector := CoverageCollector new. "Instantiate"
collector methods: Point methods, Rectangle methods. "Configure with the methods to watch."
coverage := collector runOn: [ (1@1 corner: 2@2) center ]. "Setup, execute and teardown."
self assert: (coverage methods includes: Point>>#x). "Inspect the results"
self assert: (coverage nodes size > 10). "Covered paths are also available"
"We skip the method with special selectors because them might not be detected by the coverage collector in case they are optimized by the VM."
Copy link
Member

Choose a reason for hiding this comment

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

ok!

collector methods: (Point methods , Rectangle methods reject: [ :method | BytecodeEncoder specialSelectors includes: method selector ]). "Configure with the methods to watch."
coverage := collector runOn: [ (1 @ 1 corner: 2 @ 2) center ]. "Setup, execute and teardown."
self
assertCollection: (coverage methods collect: [ :method | method name ])
hasSameElements:
#( 'Point>>#corner:' 'Point>>#isPoint' 'Rectangle>>#setPoint:point:' 'Rectangle>>#topLeft'
'Rectangle>>#bottomRight' 'Rectangle>>#center' ). "Inspect the results"
self assert: coverage nodes size equals: 6 "Covered paths are also available"
]

{ #category : #tests }
Expand Down
2 changes: 2 additions & 0 deletions src/Fuel-Tests-Core/FLCreateClassSerializationTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ FLCreateClassSerializationTest >> testCreateClassAndMetaclass [
"Tests materialization a class or trait not defined in the image and that the metaclass is also created."

| class materializedClassOrTrait environment category name metaclassName metaclass |
self longTestCase.

class := self classFactory silentlyNewClass.
environment := class environment.
category := class category.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ FLTCreateClassOrTraitSerializationTest >> testCreateBasic [
"Tests materialization a class or trait not defined in the image."

| aClassOrTrait materializedClassOrTrait environment category name |
self longTestCase.

aClassOrTrait := self newClassOrTrait.
environment := aClassOrTrait environment.
category := aClassOrTrait category.
Expand Down
6 changes: 6 additions & 0 deletions src/SUnit-Core/TestCase.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -748,6 +748,12 @@ TestCase >> logFailure: aString [
flush]
]

{ #category : #utilities }
TestCase >> longTestCase [

self timeLimit: 60 seconds
]

{ #category : #accessing }
TestCase >> nameForReport [

Expand Down
6 changes: 0 additions & 6 deletions src/System-DependenciesTests/SystemDependenciesTest.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,6 @@ SystemDependenciesTest >> knownUIDependencies [
#'Athens-Morphic' #'Refactoring-Critics' #'Refactoring-Environment' 'Reflectivity-Tools' #Shout #'Tool-Diff' #'Tool-FileList' #'Tool-Profilers' #'HeuristicCompletion-Model' 'NECompletion-Morphic' #VariablesLibrary #'Tools-CodeNavigation' #'Spec2-CommonWidgets')
]

{ #category : #utilities }
SystemDependenciesTest >> longTestCase [

self timeLimit: 60 seconds
]

{ #category : #accessing }
SystemDependenciesTest >> metacelloPackageNames [

Expand Down