Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
Dspace7 Angular
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vtechworks
Dspace7 Angular
Commits
0048a971
Commit
0048a971
authored
5 years ago
by
Art Lowel
Browse files
Options
Downloads
Patches
Plain Diff
fix issue where submission requests would time out before they could be used once
parent
afa61b11
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/core/submission/submission-rest.service.spec.ts
+1
-2
1 addition, 2 deletions
src/app/core/submission/submission-rest.service.spec.ts
src/app/core/submission/submission-rest.service.ts
+3
-4
3 additions, 4 deletions
src/app/core/submission/submission-rest.service.ts
with
4 additions
and
6 deletions
src/app/core/submission/submission-rest.service.spec.ts
+
1
−
2
View file @
0048a971
...
...
@@ -59,12 +59,11 @@ describe('SubmissionRestService test suite', () => {
describe
(
'
getDataById
'
,
()
=>
{
it
(
'
should configure a new SubmissionRequest
'
,
()
=>
{
const
expected
=
new
SubmissionRequest
(
requestService
.
generateRequestId
(),
resourceHref
);
// set cache time to zero
expected
.
responseMsToLive
=
0
;
expected
.
forceBypassCache
=
true
;
scheduler
.
schedule
(()
=>
service
.
getDataById
(
resourceEndpoint
,
resourceScope
).
subscribe
());
scheduler
.
flush
();
expect
(
requestService
.
removeByHrefSubstring
).
toHaveBeenCalledWith
(
resourceHref
);
expect
(
requestService
.
configure
).
toHaveBeenCalledWith
(
expected
);
});
});
...
...
This diff is collapsed.
Click to expand it.
src/app/core/submission/submission-rest.service.ts
+
3
−
4
View file @
0048a971
...
...
@@ -109,11 +109,10 @@ export class SubmissionRestService {
filter
((
href
:
string
)
=>
isNotEmpty
(
href
)),
distinctUntilChanged
(),
map
((
endpointURL
:
string
)
=>
new
SubmissionRequest
(
requestId
,
endpointURL
)),
m
ap
((
request
:
RestRequest
)
=>
{
request
.
responseMsToLive
=
0
;
return
request
;
t
ap
((
request
:
RestRequest
)
=>
{
this
.
request
Service
.
removeByHrefSubstring
(
request
.
href
)
;
this
.
requestService
.
configure
(
request
)
;
}),
tap
((
request
:
RestRequest
)
=>
this
.
requestService
.
configure
(
request
)),
flatMap
(()
=>
this
.
fetchRequest
(
requestId
)),
distinctUntilChanged
());
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment