package store import "testing" // streamKey 必须按 channel 分命名空间,token 与 exec 流互不串扰。 func TestStreamKey_ChannelIsolation(t *testing.T) { tok := streamKey(ChannelToken, "task_1") ex := streamKey(ChannelExec, "task_1") if tok == ex { t.Fatalf("同任务的 token/exec 流 key 不应相同: %q", tok) } if tok != "sundynix:stream:task_1" { t.Errorf("token key=%q", tok) } if ex != "sundynix:exec:task_1" { t.Errorf("exec key=%q", ex) } }