Skip to content

Instantly share code, notes, and snippets.

Spec::Runner.configure do |config|
config.before(:suite) do
configuration = org.jboss.arquillian.impl.XmlConfigurationBuilder.new.build()
Thread.current[:test_runner_adaptor] = org.jboss.arquillian.impl.DeployableTestBuilder.build(configuration)
Thread.current[:test_runner_adaptor].beforeSuite
end
config.before(:all) do
if (self.class.respond_to? :create_deployment)
Dear Mr. Benton,
It has been brought to our attention that our social studies
class, Ze Fat Cats, has been treated differently than the other
classes in the case of the ropes course. This message is written
not in an act of asking to go out, but why we don't and if we
will. Therefore, we hope you take us seriously and consider our
thoughts.
We happen to know that both the Lactopuses (Lactopi?) and the
require 'spec_helper'
require 'open-uri'
# A remote group nested within a local one
describe "end-to-end testing" do
# Deploy our apps
deploy <<-END.gsub(/^ {4}/,'')
application:
root: #{File.dirname(__FILE__)}/..
require "#{File.dirname(__FILE__)}/../../twitter/spec/spec_helper"
require 'torquebox-core'
remote_describe "tweet consumption testing" do
# Necessary for injection in examples
include TorqueBox::Injectors
# Deploy our apps
deploy <<-END.gsub(/^ {4}/,'')
require 'torquespec'
TorqueSpec.local {
require 'capybara/dsl'
require 'akephalos'
Capybara.register_driver :akephalos do |app|
Capybara::Driver::Akephalos.new(app, :browser => :firefox_3)
end
$ rvm install jruby
$ rvm --create jruby@torquebox
$ gem install bundler
$ gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/
$ gem install rails
$ rails new myapp -m $(torquebox env TORQUEBOX_HOME)/share/rails/template.rb
$ cd myapp
$ torquebox deploy
$ torquebox run
require 'java'
require 'rubygems'
def require_module_jar(path)
require File.join( ENV['TORQUEBOX_HOME'], "/jboss/modules/", path )
end
require_module_jar "javax/jms/api/main/jboss-jms-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "javax/transaction/api/main/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"
require_module_jar "org/hornetq/main/hornetq-core-2.2.7.Final.jar"
@jcrossley3
jcrossley3 / todo.org
Created January 24, 2012 16:55
Simulated clustering

To test clustering using a single JBoss instance on a single server, use the properties jboss.node.name, jboss.server.data.dir, and jboss.socket.binding.port-offset

In one shell, run

$JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=one -Djboss.server.data.dir=/tmp/one

In another, run

$JBOSS_HOME/bin/standalone.sh --server-config=standalone-ha.xml -Djboss.node.name=two -Djboss.server.data.dir=/tmp/two -Djboss.socket.binding.port-offset=100
@xeqi
xeqi / pallet.clj
Last active December 14, 2015 23:39
immutant and pallet
(require
'[pallet.crate.git :refer [git clone]]
'[pallet.crate.java :refer [java]]
'[pallet.crate.lein :refer [lein leiningen]])
(def repo "git://github.com/jcrossley3/random-apps-of-kindness.git")
(def demo-directory "random-apps-of-kindness/demo")
(defplan setup-machine
<subsystem xmlns="urn:jboss:domain:jgroups:1.1" default-stack="tcp">
<stack name="tcp">
<transport type="TCP" socket-binding="jgroups-tcp"/>
<!-- Use S3_Ping because we need to discover the IPs of
the other nodes, and AWS doesn't have multicast. -->
<protocol type="S3_PING">
<property name="secret_access_key">topsy</property>
<property name="access_key">krets</property>