Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill babuza-testcluster명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | babuza-testcluster |
| description | | Use when this capability is needed. |
Package:
github.com/fanaujie/babuza/test/testclusterFramework for orchestrating Babuza integration tests with network failure simulation.
You are an expert at testing distributed systems with babuza. Help users by:
testcluster.Refer to the local files for detailed scenarios:
./references/scenarios.md - Common testing patterns (partition, leadership transfer).Setup a cluster for direct network testing (no faults).
func TestClusterBasic(t *testing.T) {
// 1. Setup
storageDir := t.TempDir()
cluster := testcluster.CreateTestCluster(
1, storageDir, nil, createEmbeddedApp,
)
defer cluster.Teardown()
// 2. Create Peers
peerFactory := testcluster.NewPeerFactory(14200, 10000, 24200)
peers, group := peerFactory.MakeVotingStandardPeers(3)
// 3. Start
wait := cluster.RaftElectionTimeout() * 3
err := cluster.MakeCluster(wait, peers)
require.NoError(t, err)
// 4. Verify Leader
_, err = cluster.CheckOneLeader(wait, group.GetIDs())
require.NoError(t, err)
}
Use ProxyNetwork to simulate split-brain scenarios.
func TestPartition(t *testing.T) {
// 1. Setup with Proxy Network
proxy := proxynetwork.New()
cluster := testcluster.CreateTestCluster(1, dir, proxy, createApp)
// ... start cluster ...
// 2. Isolate Node 3 (Partition: {1,2}, {3})
cluster.SetPartition([]uint64{1, 2})
// 3. Verify Majority works
leader, _ := cluster.CheckOneLeader(wait, []uint64{1, 2})
// 4. Heal Partition
cluster.SetPartition([]uint64{1, 2, 3})
}
Inject latency or packet loss.
import "github.com/fanaujie/babuza/pkg/transport/protocol/tcp/networkio/proxynetwork"
// Add 50ms delay to Node 1
cluster.SetPeerFault(1, proxynetwork.FaultConfig{
DelayMin: 50 * time.Millisecond,
DelayMax: 50 * time.Millisecond,
})
// Add 20% packet loss to Node 2
cluster.SetPeerFault(2, proxynetwork.FaultConfig{
LossRate: 0.2,
})
// Restore
cluster.ClearPeerFault(1)
NewPeerFactory(raftBase, appBase, proxyBase)
raftBase: Start of Raft ports (e.g., 14200)appBase: Start of App Service ports (e.g., 10000)proxyBase: Start of Proxy ports (e.g., 24200)StandardPeer cannot simulate faults; BabuzaPeer (Proxy) is required.cluster.RaftElectionTimeout() * N for waiting, rather than hardcoded sleeps.defer cluster.Teardown().Converted and distributed by TomeVault — claim your Tome and manage your conversions.