Ejemplo n.º 1
0
func TestHM9000(t *testing.T) {
	RegisterFailHandler(Fail)

	etcdRunner = storerunner.NewETCDClusterRunner(5001, 1)
	etcdRunner.Start()

	RunSpecs(t, "HM9000 CLI Suite")

	etcdRunner.Stop()
}
Ejemplo n.º 2
0
func TestAnalyzer(t *testing.T) {
	RegisterFailHandler(Fail)

	etcdRunner = storerunner.NewETCDClusterRunner(5001, 1)
	etcdRunner.Start()

	RunSpecs(t, "Analyzer Suite")

	etcdRunner.Stop()
}
Ejemplo n.º 3
0
func TestStore(t *testing.T) {
	registerSignalHandler()
	RegisterFailHandler(Fail)

	etcdRunner = storerunner.NewETCDClusterRunner(5001, 1)

	RunSpecs(t, "Store Suite")

	etcdRunner.Stop()
}
Ejemplo n.º 4
0
func TestStoreAdapter(t *testing.T) {
	registerSignalHandler()
	RegisterFailHandler(Fail)

	etcdPort := 5000 + (config.GinkgoConfig.ParallelNode-1)*10
	etcdRunner = storerunner.NewETCDClusterRunner(etcdPort, 5)

	zookeeperPort := 2181 + (config.GinkgoConfig.ParallelNode-1)*10
	zookeeperRunner = storerunner.NewZookeeperClusterRunner(zookeeperPort, 1)

	etcdRunner.Start()
	zookeeperRunner.Start()

	RunSpecs(t, "Store Adapter Suite")

	stopStores()
}
var concurrencies = []int{1, 5, 10, 15, 20, 25, 30}
var recordSizes = []int{128, 256, 512, 1024, 2048, 4096}

var _ = Describe("Detailed Store Performance", func() {
	for _, storeType := range storeTypes {
		storeType := storeType
		for _, nodes := range nodeCounts {
			nodes := nodes
			for _, concurrency := range concurrencies {
				concurrency := concurrency
				Context(fmt.Sprintf("With %d %s nodes (%d concurrent requests at a time)", nodes, storeType, concurrency), func() {
					var storeAdapter storeadapter.StoreAdapter

					BeforeEach(func() {
						if storeType == "ETCD" {
							storeRunner = storerunner.NewETCDClusterRunner(5001, nodes)
							storeRunner.Start()

							storeAdapter = storeadapter.NewETCDStoreAdapter(storeRunner.NodeURLS(), workerpool.NewWorkerPool(concurrency))
							err := storeAdapter.Connect()
							Ω(err).ShouldNot(HaveOccured())
						} else if storeType == "Zookeeper" {
							storeRunner = storerunner.NewZookeeperClusterRunner(2181, nodes)
							storeRunner.Start()

							storeAdapter = storeadapter.NewZookeeperStoreAdapter(storeRunner.NodeURLS(), workerpool.NewWorkerPool(concurrency), &timeprovider.RealTimeProvider{}, time.Second)
							err := storeAdapter.Connect()
							Ω(err).ShouldNot(HaveOccured())
						}
					})