Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DARIAH-DE OAI-PMH Services
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
DARIAH-DE
DARIAH-DE OAI-PMH Services
Commits
cfe6b567
Commit
cfe6b567
authored
5 years ago
by
Stefan E. Funk
Browse files
Options
Downloads
Patches
Plain Diff
Correct test for GetRecords
parent
e5205c47
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
+71
-45
71 additions, 45 deletions
...a/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
with
71 additions
and
45 deletions
oaipmh-core/src/test/java/info/textgrid/middleware/OaiPmhTextgridOnlineTests.java
+
71
−
45
View file @
cfe6b567
...
@@ -479,7 +479,7 @@ public class OaiPmhTextgridOnlineTests {
...
@@ -479,7 +479,7 @@ public class OaiPmhTextgridOnlineTests {
System
.
out
.
println
(
TESTING
+
"testRestokConcurrentlyListRecords()"
);
System
.
out
.
println
(
TESTING
+
"testRestokConcurrentlyListRecords()"
);
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
2
);
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
3
);
Future
<
Boolean
>
f1
=
executor
.
submit
(
new
OaiPmhResumptionTokenTestThread
(
VERB_LIST_RECORDS
,
Future
<
Boolean
>
f1
=
executor
.
submit
(
new
OaiPmhResumptionTokenTestThread
(
VERB_LIST_RECORDS
,
NO_SET
,
OAI_DC_PREFIX
,
33
,
100
,
"[B1]"
));
NO_SET
,
OAI_DC_PREFIX
,
33
,
100
,
"[B1]"
));
...
@@ -503,50 +503,76 @@ public class OaiPmhTextgridOnlineTests {
...
@@ -503,50 +503,76 @@ public class OaiPmhTextgridOnlineTests {
System
.
out
.
println
(
TESTING
+
"testConcurrentlyOAIDCGetRecord()"
);
System
.
out
.
println
(
TESTING
+
"testConcurrentlyOAIDCGetRecord()"
);
for
(
int
i
=
0
;
i
<
9
;
i
++)
{
String
id1
=
"textgrid:mq05.0"
;
String
id2
=
"textgrid:jgv6.0"
;
System
.
out
.
println
(
"\tThis is loop "
+
(
i
+
1
));
String
id3
=
"textgrid:w7rz.0"
;
String
id4
=
"textgrid:w36b.0"
;
String
id1
=
"textgrid:mq05.0"
;
String
id5
=
"textgrid:mcdv.0"
;
String
id2
=
"textgrid:jgv6.0"
;
String
id6
=
"textgrid:v0qx.0"
;
String
id3
=
"textgrid:w7rz.0"
;
String
id7
=
"textgrid:xkck.0"
;
String
id4
=
"textgrid:w36b.0"
;
String
id8
=
"textgrid:t3m1.0"
;
String
id5
=
"textgrid:mcdv.0"
;
String
id9
=
"textgrid:10rsq.0"
;
String
id6
=
"textgrid:v0qx.0"
;
String
id10
=
"textgrid:mq05.0"
;
String
id7
=
"textgrid:xkck.0"
;
String
id11
=
"textgrid:jgv6.0"
;
String
id8
=
"textgrid:t3m1.0"
;
String
id12
=
"textgrid:w7rz.0"
;
String
id9
=
"textgrid:10rsq.0"
;
String
id13
=
"textgrid:w36b.0"
;
String
id14
=
"textgrid:mcdv.0"
;
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
2
);
String
id15
=
"textgrid:v0qx.0"
;
String
id16
=
"textgrid:xkck.0"
;
if
(!
host
.
contains
(
"dev.textgridlab.org"
))
{
String
id17
=
"textgrid:t3m1.0"
;
Future
<
Boolean
>
f1
=
executor
String
id18
=
"textgrid:10rsq.0"
;
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id1
,
OAI_DC_PREFIX
,
"[GR1]"
));
Future
<
Boolean
>
f2
=
executor
if
(!
host
.
contains
(
"dev.textgridlab.org"
))
{
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id2
,
OAI_DC_PREFIX
,
"[GR2]"
));
Future
<
Boolean
>
f3
=
executor
ExecutorService
executor
=
Executors
.
newFixedThreadPool
(
18
);
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id3
,
OAI_DC_PREFIX
,
"[GR3]"
));
Future
<
Boolean
>
f4
=
executor
Future
<
Boolean
>
f1
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id4
,
OAI_DC_PREFIX
,
"[GR4]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id1
,
OAI_DC_PREFIX
,
"[GR1]"
));
Future
<
Boolean
>
f5
=
executor
Future
<
Boolean
>
f2
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id5
,
OAI_DC_PREFIX
,
"[GR5]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id2
,
OAI_DC_PREFIX
,
"[GR2]"
));
Future
<
Boolean
>
f6
=
executor
Future
<
Boolean
>
f3
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id6
,
OAI_DC_PREFIX
,
"[GR6]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id3
,
OAI_DC_PREFIX
,
"[GR3]"
));
Future
<
Boolean
>
f7
=
executor
Future
<
Boolean
>
f4
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id7
,
OAI_DC_PREFIX
,
"[GR7]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id4
,
OAI_DC_PREFIX
,
"[GR4]"
));
Future
<
Boolean
>
f8
=
executor
Future
<
Boolean
>
f5
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id8
,
OAI_DC_PREFIX
,
"[GR8]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id5
,
OAI_DC_PREFIX
,
"[GR5]"
));
Future
<
Boolean
>
f9
=
executor
Future
<
Boolean
>
f6
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id9
,
OAI_DC_PREFIX
,
"[GR9]"
));
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id6
,
OAI_DC_PREFIX
,
"[GR6]"
));
Future
<
Boolean
>
f7
=
executor
executor
.
shutdown
();
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id7
,
OAI_DC_PREFIX
,
"[GR7]"
));
Future
<
Boolean
>
f8
=
executor
System
.
out
.
println
(
OK
+
": [GR1]="
+
f1
.
get
()
+
", [GR2]="
+
f2
.
get
()
+
", [GR3]="
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id8
,
OAI_DC_PREFIX
,
"[GR8]"
));
+
f3
.
get
()
+
", [GR4]="
+
f4
.
get
()
+
", [GR5]="
+
f5
.
get
()
+
", [GR6]="
+
f6
.
get
()
Future
<
Boolean
>
f9
=
executor
+
", [GR7]="
+
f7
.
get
()
+
", [GR8]="
+
f8
.
get
()
+
", [GR9]="
+
f9
.
get
());
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id9
,
OAI_DC_PREFIX
,
"[GR9]"
));
}
else
{
Future
<
Boolean
>
f10
=
executor
System
.
out
.
println
(
NOT_TESTED
);
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id10
,
OAI_DC_PREFIX
,
"[GR10]"
));
}
Future
<
Boolean
>
f11
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id11
,
OAI_DC_PREFIX
,
"[GR11]"
));
Future
<
Boolean
>
f12
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id12
,
OAI_DC_PREFIX
,
"[GR12]"
));
Future
<
Boolean
>
f13
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id13
,
OAI_DC_PREFIX
,
"[GR13]"
));
Future
<
Boolean
>
f14
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id14
,
OAI_DC_PREFIX
,
"[GR14]"
));
Future
<
Boolean
>
f15
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id15
,
OAI_DC_PREFIX
,
"[GR15]"
));
Future
<
Boolean
>
f16
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id16
,
OAI_DC_PREFIX
,
"[GR16]"
));
Future
<
Boolean
>
f17
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id17
,
OAI_DC_PREFIX
,
"[GR17]"
));
Future
<
Boolean
>
f18
=
executor
.
submit
(
new
OaiPmhGetRecordTestThread
(
VERB_GET_RECORD
,
id18
,
OAI_DC_PREFIX
,
"[GR18]"
));
executor
.
shutdown
();
System
.
out
.
println
(
OK
+
"[GR1]="
+
f1
.
get
()
+
", [GR2]="
+
f2
.
get
()
+
", [GR3]="
+
f3
.
get
()
+
", [GR4]="
+
f4
.
get
()
+
", [GR5]="
+
f5
.
get
()
+
", [GR6]="
+
f6
.
get
()
+
", [GR7]="
+
f7
.
get
()
+
", [GR8]="
+
f8
.
get
()
+
", [GR9]="
+
f9
.
get
()
+
", [GR10]="
+
f10
.
get
()
+
", [GR11]="
+
f11
.
get
()
+
", [GR12]="
+
f12
.
get
()
+
", [GR13]="
+
f13
.
get
()
+
", [GR14]="
+
f14
.
get
()
+
", [GR15]="
+
f15
.
get
()
+
", [GR16]="
+
f16
.
get
()
+
", [GR17]="
+
f17
.
get
()
+
", [GR18]="
+
f18
.
get
());
}
else
{
System
.
out
.
println
(
NOT_TESTED
);
}
}
}
}
...
...
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