Status: FixToInclude
Owner:
[hidden email]
Labels: Milestone-1.4
New issue 5127 by
[hidden email]: Zinc update
http://code.google.com/p/pharo/issues/detail?id=5127Name: Zinc-HTTP-SvenVanCaekenberghe.233
Author: SvenVanCaekenberghe
Time: 22 December 2011, 12:54:05 pm
UUID: 8dd541c9-2890-4a8f-b5cb-d6ac2e9341af
Ancestors: Zinc-HTTP-SvenVanCaekenberghe.232
Rewrote ZnServer and subclasses's class methods #startDefaultOn: and
#defaultOn: to treat the default instance like a singleton by
reusing/restarting/reconfiguring existing instances; expanded comments;
Changed the implementation of ZnServer>>#start to automagically register
the default instance;
Changed the implementation of ZnServer>>#stop to always unregister;
added ZnServer>>#stop: with an option to control the unregistering so that
it does not happen when shutting down the image
----
Name: Zinc-Tests-SvenVanCaekenberghe.121
Author: SvenVanCaekenberghe
Time: 22 December 2011, 12:56:23 pm
UUID: c1396284-0787-4c42-bedd-fb6ae918c68d
Ancestors: Zinc-Tests-SvenVanCaekenberghe.120
added ZnServerTests>>#testDefault to test the new semantics of ZnServer
class>>#startDefaultOn:
---
ZnServerTests>>#testDefault
| server |
ZnServer stopDefault.
self assert: ZnServer default isNil.
server := ZnServer startDefaultOn: 1701.
self assert: ZnServer default notNil.
self assert: ZnServer default == server.
self assert: ZnServer default port = 1701.
self assert: ZnServer default isRunning.
self assert: (ZnServer managedServers includes: server).
ZnServer stopDefault.
self assert: ZnServer default isNil.
self deny: server isRunning.
self deny: (ZnServer managedServers includes: server).
server := ZnServer startDefaultOn: 1701.
"Starting the default again is actually a restart"
ZnServer startDefaultOn: 1701.
self assert: ZnServer default == server.
ZnServer stopDefault
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker