一个分布式测试系统利器

简介: Create an EC2 instance Sign up for AWSIn Services -> EC2, click “Launch Instance”Choose the 64 bit Debian Jessie image...

Create an EC2 instance

  1. Sign up for AWS
  2. In Services -> EC2, click “Launch Instance”
  3. Choose the 64 bit Debian Jessie image
  4. Hit review and launch

Save your SSH key pair!

Install Java

SSH into your instance and open /etc/apt/sources.list in your favorite editor. Add jessie-backports to the file:

deb http://ftp.debian.org/debian jessie-backports main

Now run sudo apt-get update, and install the following!

$ sudo apt-get install openjdk-8-jre openjdk-8-jre-headless libjna-java

Use Docker

You need to install docker and docker compose. Then spin up the containers:

$ git clone https://github.com/aphyr/jepsen && cd jepsen/docker
$ ./up.sh
$ docker exec -it jepsen-control bash

Write your test

Create a new Leiningen project:

$ lein new foo && cd foo

And edit src/jepsen/foo.clj — your first test! This does nothing!

(ns jepsen.zookeeper
  (:require [jepsen.tests :as tests]))

(defn zk-test
  [version]
  tests/noop-test)

Edit test/jepsen/foo_test.clj to look like this:

(ns jepsen.foo-test
  (:require [clojure.test :refer :all]
    [jepsen.core :as jepsen]
    [jepsen.foo :as foo]))
(deftest a-test
  (is (:valid? (:results (jepsen/run! (foo/foo "3.4.5+dfsg-2"))))))

That calls the test you just wrote (and passes it a version number).

Finally! Run your test:

$ lein test

And hopefully you get something that ends with:

Everything looks good! ヽ(‘ー`)ノ


目录
相关文章
|
11天前
|
数据采集 监控 数据管理
LabVIEW幅频特性测试系统
LabVIEW幅频特性测试系统
25 6
|
7天前
|
存储 负载均衡 算法
如何在Java中实现分布式存储系统
如何在Java中实现分布式存储系统
|
11天前
|
数据采集 传感器 监控
LabVIEW汽车ECU测试系统
LabVIEW汽车ECU测试系统
19 2
|
11天前
|
数据采集 传感器 数据挖掘
LabVIEW汽车转向器测试系统
LabVIEW汽车转向器测试系统
17 2
|
12天前
|
传感器 数据采集 存储
LabVIEW飞机发动机测试与故障诊断系统
LabVIEW飞机发动机测试与故障诊断系统
19 2
|
12天前
|
传感器 数据采集 监控
LabVIEW减压阀和温控阀综合测试系统
LabVIEW减压阀和温控阀综合测试系统
|
5天前
|
设计模式 存储 缓存
Java面试题:结合建造者模式与内存优化,设计一个可扩展的高性能对象创建框架?利用多线程工具类与并发框架,实现一个高并发的分布式任务调度系统?设计一个高性能的实时事件通知系统
Java面试题:结合建造者模式与内存优化,设计一个可扩展的高性能对象创建框架?利用多线程工具类与并发框架,实现一个高并发的分布式任务调度系统?设计一个高性能的实时事件通知系统
9 0
|
7天前
|
存储 负载均衡 算法
实现Java应用的分布式存储系统
实现Java应用的分布式存储系统
|
8天前
|
存储 缓存 监控
如何设计一个高可靠性的分布式缓存系统?
如何设计一个高可靠性的分布式缓存系统?
|
10天前
|
运维 监控 大数据
部署-Linux01,后端开发,运维开发,大数据开发,测试开发,后端软件,大数据系统,运维监控,测试程序,网页服务都要在Linux中进行部署
部署-Linux01,后端开发,运维开发,大数据开发,测试开发,后端软件,大数据系统,运维监控,测试程序,网页服务都要在Linux中进行部署