SMC Remote.Finding

There are two components to the SMC Remote system.The server side component is named SMCRemoteServer.The client side component is named SMCRemoteClient.†† These two programs collaborate to perform remote SMC compilation.

Common Definitions

com.objectmentor.fixtures.CommandLineFixture

definition

SERVERPATH

c:/cygwin/home/administrator/smcRemote/SMCRemoteServer.jar\;c:/jdom-b7/build/jdom.jar\;c:/oreilly/lib/cos.jar

definition

SMCREMOTESERVER

java -classpath SERVERPATH com.objectmentor.SMCRemote.server.SMCRemoteService

definition

CLIENTPATH

c:/cygwin/home/administrator/smcRemote/SMCRemoteClient.jar

definition

SMCREMOTECLIENT

java -classpath CLIENTPATH com.objectmentor.SMCRemote.client.SMCRemoteClient

 

Register a user.

The following test starts up the server and then invokes the client to register a user.It begins by deleting the user database so that there canít be any duplicate registrations.

com.objectmentor.fixtures.CommandLineFixture

title

Simple Registration test

 

command

rm -rf users



terminated with exit value 0

 

spawn

SMCREMOTESERVER -v -e


2002.11.13 04:41:00 | SMCRemoteService---------------------------------
 found SMCRemoteService
2002.11.13 04:41:01 | 0.99 found 0.99
2002.11.13 04:41:01 | port = 9000 found port = 9000
2002.11.13 04:41:01 | email is disabled 2002.11.13 04:41:01 | ------------------------------------------------- 2002.11.13 04:41:01 | <127.0.0.1:4507> Connected 2002.11.13 04:41:01 | <127.0.0.1:4507> bob@bob.com requests registration. found bob@bob.com requests registration
2002.11.13 04:41:01 | <127.0.0.1:4507> Generating password. 2002.11.13 04:41:02 | <127.0.0.1:4507> User stored. Sending password email. 2002.11.13 04:41:02 | <127.0.0.1:4507> Confirming registration. 2002.11.13 04:41:02 | Connection torn down:java.io.EOFException: Expecting code
forcibly terminated

server

find

server.stdout

SMCRemoteService

find

server.stdout

0.99

find

server.stdout

port = 9000

command

SMCREMOTECLIENT -v -r bob@bob.com


2002.11.13 04:41:01 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:01 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:01 | host =      localhost
2002.11.13 04:41:01 | port =      9000
2002.11.13 04:41:01 | ----------------------------------------------------
2002.11.13 04:41:01 | Trying to connect to: localhost:9000...
2002.11.13 04:41:01 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:01 | Attempting to register bob@bob.com
2002.11.13 04:41:02 | bob@bob.com was registered
User: bob@bob.com registered.  Email sent.
2002.11.13 04:41:02 | Closing Connection.

terminated with exit value 0

client1

contains

client1.stdout

Attempting to register bob@bob.com

contains

client1.stdout

bob@bob.com was registered

find

server.stdout

bob@bob.com requests registration

command

rm -rf users



terminated with exit value 0

 

 

Multiple simultaneous registrations

com.objectmentor.fixtures.CommandLineFixture

title

Multiple registration test

 

spawn

SMCREMOTESERVER -v -e


2002.11.13 04:41:04 | SMCRemoteService---------------------------------
2002.11.13 04:41:04 | 0.99
2002.11.13 04:41:04 | port = 9000
2002.11.13 04:41:04 | email is disabled
2002.11.13 04:41:04 | -------------------------------------------------
2002.11.13 04:41:07 | <127.0.0.1:4509> Connected
2002.11.13 04:41:07 | <127.0.0.1:4509> bob2@bob.com requests registration.
2002.11.13 04:41:07 | <127.0.0.1:4509> Generating password.
2002.11.13 04:41:07 | <127.0.0.1:4509> User stored.  Sending password email.
2002.11.13 04:41:07 | <127.0.0.1:4509> Confirming registration.
2002.11.13 04:41:07 | Connection torn down:java.io.EOFException: Expecting code
2002.11.13 04:41:07 | <127.0.0.1:4508> Connected
2002.11.13 04:41:07 | <127.0.0.1:4508> bob1@bob.com requests registration.
2002.11.13 04:41:07 | <127.0.0.1:4508> Generating password.
2002.11.13 04:41:07 | <127.0.0.1:4508> User stored.  Sending password email.
2002.11.13 04:41:07 | <127.0.0.1:4508> Confirming registration.
2002.11.13 04:41:07 | Connection torn down:java.io.EOFException: Expecting code

forcibly terminated

server

pause

2

 

spawn

SMCREMOTECLIENT -v -r bob1@bob.com


2002.11.13 04:41:06 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:06 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:06 | host =      localhost
2002.11.13 04:41:06 | port =      9000
2002.11.13 04:41:06 | ----------------------------------------------------
2002.11.13 04:41:06 | Trying to connect to: localhost:9000...
2002.11.13 04:41:07 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:07 | Attempting to register bob1@bob.com
2002.11.13 04:41:07 | bob1@bob.com was registered
User: bob1@bob.com registered.  Email sent.
2002.11.13 04:41:07 | Closing Connection.

terminated with exit value 0

client1

spawn

SMCREMOTECLIENT -v -r bob2@bob.com


2002.11.13 04:41:06 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:06 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:06 | host =      localhost
2002.11.13 04:41:06 | port =      9000
2002.11.13 04:41:06 | ----------------------------------------------------
2002.11.13 04:41:06 | Trying to connect to: localhost:9000...
2002.11.13 04:41:07 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:07 | Attempting to register bob2@bob.com
2002.11.13 04:41:07 | bob2@bob.com was registered
User: bob2@bob.com registered.  Email sent.
2002.11.13 04:41:07 | Closing Connection.

terminated with exit value 0

client2

waitFor

client1

 

waitFor

client2

 

contains

client1.stdout

bob1@bob.com was registered

contains

client2.stdout

bob2@bob.com was registered

 

Simple compile

com.objectmentor.fixtures.CommandLineFixture

title

Simple compile

 

command

rm -f F.java



terminated with exit value 0

 

createFile

users/bill@bill.com

<?xml version="1.0" encoding="UTF-8"?>

<user><name>bill@bill.com</name><password>billy</password><loginCount>0</loginCount></user>

spawn

SMCREMOTESERVER -e -v


2002.11.13 04:41:09 | SMCRemoteService---------------------------------
2002.11.13 04:41:10 | 0.99
2002.11.13 04:41:10 | port = 9000
2002.11.13 04:41:10 | email is disabled
2002.11.13 04:41:10 | -------------------------------------------------
2002.11.13 04:41:10 | <127.0.0.1:4510> Connected
2002.11.13 04:41:11 | <127.0.0.1:4510> Login(1): bill@bill.com accepted.
2002.11.13 04:41:11 | <127.0.0.1:4510> Compiling: x.sm using java generator.
2002.11.13 04:41:11 | <127.0.0.1:4510> Sending: F.java
2002.11.13 04:41:11 | Connection closed normally.

forcibly terminated

server

createFile

x.sm

Context c
Initial I
FSMName F
{I {E I A}}

command

SMCREMOTECLIENT -v -u bill@bill.com -w billy x.sm


2002.11.13 04:41:10 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:10 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:10 | host =      localhost
2002.11.13 04:41:10 | port =      9000
2002.11.13 04:41:10 | ----------------------------------------------------
2002.11.13 04:41:10 | Compiling...
2002.11.13 04:41:10 | file =      x.sm
2002.11.13 04:41:10 | generator = java
2002.11.13 04:41:10 | Trying to connect to: localhost:9000...
2002.11.13 04:41:10 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:11 | login (1) accepted.
2002.11.13 04:41:11 | Sending file and requesting compilation.
2002.11.13 04:41:11 | Compilation results received.
2002.11.13 04:41:11 | ..file: F.java received.

C:\cygwin\home\Administrator\smcRemote\SmcRemoteClient>cd smcTempDirectory1037227271413 

C:\cygwin\home\administrator\smcRemote\SmcRemoteClient\smcTempDirectory1037227271413>java -cp c:\SMC\smc.jar smc.Smc -f -g smc.generator.java.SMJavaGenerator x.sm 
2002.11.13 04:41:11 | Closing Connection.

terminated with exit value 0

compile

fileExists

F.java

 

 

Multiple simultaneous compiles

com.objectmentor.fixtures.CommandLineFixture

title

Multiple compiles

 

command

rm -f F.java



terminated with exit value 0

 

command

rm -f G.java



terminated with exit value 0

 

createFile

y.sm

Context c
Initial I
FSMName G
{I {E I A}}

spawn

SMCREMOTESERVER -e -v


2002.11.13 04:41:14 | SMCRemoteService---------------------------------
2002.11.13 04:41:14 | 0.99
2002.11.13 04:41:14 | port = 9000
2002.11.13 04:41:14 | email is disabled
2002.11.13 04:41:14 | -------------------------------------------------
2002.11.13 04:41:15 | <127.0.0.1:4512> Connected
2002.11.13 04:41:15 | <127.0.0.1:4511> Connected
2002.11.13 04:41:15 | <127.0.0.1:4511> Login(2): bill@bill.com accepted.
2002.11.13 04:41:16 | <127.0.0.1:4511> Compiling: y.sm using java generator.
2002.11.13 04:41:16 | <127.0.0.1:4512> Login(3): bill@bill.com accepted.
2002.11.13 04:41:16 | <127.0.0.1:4511> Sending: G.java
2002.11.13 04:41:16 | Connection closed normally.
2002.11.13 04:41:16 | Connection torn down:java.net.SocketException: JVM_recv in socket input stream read (code=10004)

forcibly terminated

server

spawn

SMCREMOTECLIENT -v -u bill@bill.com -w billy x.sm


2002.11.13 04:41:14 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:15 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:15 | host =      localhost
2002.11.13 04:41:15 | port =      9000
2002.11.13 04:41:15 | ----------------------------------------------------
2002.11.13 04:41:15 | Compiling...
2002.11.13 04:41:15 | file =      x.sm
2002.11.13 04:41:15 | generator = java
2002.11.13 04:41:15 | Trying to connect to: localhost:9000...
2002.11.13 04:41:15 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:16 | login (3) accepted.
2002.11.13 04:41:16 | Sending file and requesting compilation.
2002.11.13 04:41:16 | Compilation process failed: Expecting code
Internal error, something awful.  Sorry.
2002.11.13 04:41:16 | Closing Connection.
 gave up finding Compilation results received.

terminated with exit value 0

compile1

spawn

SMCREMOTECLIENT -v -u bill@bill.com -w billy y.sm


2002.11.13 04:41:14 | SMCRemoteClient-------------------------------------
2002.11.13 04:41:15 | $Id: SMCRemoteClient.java,v 1.10 2002/10/28 02:00:40 Administrator Exp $
2002.11.13 04:41:15 | host =      localhost
2002.11.13 04:41:15 | port =      9000
2002.11.13 04:41:15 | ----------------------------------------------------
2002.11.13 04:41:15 | Compiling...
2002.11.13 04:41:15 | file =      y.sm
2002.11.13 04:41:15 | generator = java
2002.11.13 04:41:15 | Trying to connect to: localhost:9000...
2002.11.13 04:41:15 | Connection acknowledged: SMCR Server. 0.99
2002.11.13 04:41:15 | login (2) accepted.
2002.11.13 04:41:15 | Sending file and requesting compilation.
2002.11.13 04:41:16 | Compilation results received.
 found Compilation results received.
2002.11.13 04:41:16 | ..file: G.java received. C:\cygwin\home\Administrator\smcRemote\SmcRemoteClient>cd smcTempDirectory1037227276010 C:\cygwin\home\administrator\smcRemote\SmcRemoteClient\smcTempDirectory1037227276010>java -cp c:\SMC\smc.jar smc.Smc -f -g smc.generator.java.SMJavaGenerator y.sm 2002.11.13 04:41:16 | Closing Connection.
terminated with exit value 0

compile2

waitFor

compile1

 

waitFor

compile2

 

find

compile1.stdout

Compilation results received.

find

compile2.stdout

Compilation results received.

fileExists

F.java

 

fileExists

G.java

 

 

Summary

fit.Summary

counts 11 right, 2 wrong, 0 ignored, 0 exceptions
input file C:\cygwin\home\Administrator\smcRemote\SmcRemoteClient\acceptanceTest.htm
input update Wed Nov 13 16:27:51 CST 2002
output file C:\cygwin\home\Administrator\smcRemote\SmcRemoteClient\acceptanceTestResults.htm
run date Wed Nov 13 16:41:00 CST 2002
run elapsed time 0:18.95