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

Add a concurrent connections threshold configuration parameter #184

Merged
merged 2 commits into from
Mar 22, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
"
I'm a testing application used to check the concurrent connections threshold configuration parameter behavior.
"
Class {
#name : 'ConcurrentConnectionsTestApplication',
#superclass : 'StargateApplication',
#category : 'Stargate-API-Skeleton-Tests',
#package : 'Stargate-API-Skeleton-Tests'
}

{ #category : 'accessing' }
ConcurrentConnectionsTestApplication class >> commandName [

^ 'concurrent-connections-test'
]

{ #category : 'accessing' }
ConcurrentConnectionsTestApplication class >> description [

^'A Test API making the request processing to wait a certain amount of time'
]

{ #category : 'initialization' }
ConcurrentConnectionsTestApplication class >> initialize [

<ignoreForCoverage>
self initializeVersion
]

{ #category : 'private' }
ConcurrentConnectionsTestApplication class >> projectName [

^ 'Stargate'
]

{ #category : 'private - accessing' }
ConcurrentConnectionsTestApplication >> controllersToInstall [

^ { DelayedRESTfulController new }
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
"
I'm a example of a RESTful controller:
- only implementing GET operations
- not paginating collections
- not using hypermedia
"
Class {
#name : 'DelayedRESTfulController',
#superclass : 'SingleResourceRESTfulController',
#instVars : [
'requestHandler'
],
#category : 'Stargate-API-Skeleton-Tests',
#package : 'Stargate-API-Skeleton-Tests'
}

{ #category : 'routes' }
DelayedRESTfulController >> declareWaitRoute [

^ RouteSpecification handling: #GET at: self endpoint evaluating: [ :httpRequest :requestContext |
100 milliSeconds wait.
ZnResponse ok: ( ZnEntity text: 'OK' )
]
]

{ #category : 'initialization' }
DelayedRESTfulController >> initialize [

super initialize.
requestHandler := RESTfulRequestHandlerBuilder new
handling: 'wait';
createEntityTagHashingEncodedResource;
build
]

{ #category : 'private' }
DelayedRESTfulController >> requestHandler [

^ requestHandler
]

{ #category : 'private' }
DelayedRESTfulController >> typeIdConstraint [

^ IsObject
]
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
Class {
#name : #StargateApplicationStackTraceDumperTest,
#superclass : #TestCase,
#category : #'Stargate-API-Skeleton-Tests'
#name : 'StargateApplicationStackTraceDumperTest',
#superclass : 'TestCase',
#category : 'Stargate-API-Skeleton-Tests',
#package : 'Stargate-API-Skeleton-Tests'
}

{ #category : #accessing }
{ #category : 'accessing' }
StargateApplicationStackTraceDumperTest class >> defaultTimeLimit [

^5 minute
]

{ #category : #running }
{ #category : 'running' }
StargateApplicationStackTraceDumperTest >> setUp [

super setUp.
StargateApplication logsDirectory ensureCreateDirectory
]

{ #category : #'tests - application' }
{ #category : 'tests - application' }
StargateApplicationStackTraceDumperTest >> testStackTraceDumper [

| dumper result |
Expand Down
Loading