Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
cameo-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Cameo
cameo-tests
Commits
d3eb7dc0
Commit
d3eb7dc0
authored
Nov 15, 2018
by
legoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added test
parent
50bd3ea4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
src/main/java/fr/ill/ics/cameo/test/TestServerWithSimpleApplication.java
...r/ill/ics/cameo/test/TestServerWithSimpleApplication.java
+54
-0
src/main/java/fr/ill/ics/cameo/test/TestStartWithSimpleApplication.java
...fr/ill/ics/cameo/test/TestStartWithSimpleApplication.java
+1
-1
No files found.
src/main/java/fr/ill/ics/cameo/test/TestServerWithSimpleApplication.java
0 → 100644
View file @
d3eb7dc0
/*
* Copyright 2015 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package
fr.ill.ics.cameo.test
;
import
java.util.Date
;
import
fr.ill.ics.cameo.Application
;
import
fr.ill.ics.cameo.Server
;
public
class
TestServerWithSimpleApplication
{
public
static
void
main
(
String
[]
args
)
{
int
numberOfTimes
=
Integer
.
parseInt
(
args
[
0
]);
Server
server
=
new
Server
(
"tcp://localhost:10000"
);
Date
d
=
new
Date
();
// loop the number of times.
for
(
int
i
=
0
;
i
<
numberOfTimes
;
++
i
)
{
// start the application.
Application
.
Instance
application
=
server
.
start
(
"simplejava"
);
try
{
Thread
.
sleep
(
400
);
}
catch
(
InterruptedException
e
)
{
}
System
.
out
.
println
(
"finished application "
+
application
);
}
server
.
terminate
();
System
.
out
.
println
(
"finished the application after "
+
((
new
Date
()).
getTime
()
-
d
.
getTime
())
+
"ms"
);
}
}
\ No newline at end of file
src/main/java/fr/ill/ics/cameo/test/TestStartWithSimpleApplication.java
View file @
d3eb7dc0
...
...
@@ -52,7 +52,7 @@ public class TestStartWithSimpleApplication {
// the getString is blocking until the application finishes
application
.
waitFor
();
System
.
out
.
println
(
"finished application "
+
application
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment