mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-26 06:16:56 +09:00
test: consolidate Go tests (#39962)
Consolidate all Go tests. Coverage is identical to before. Go tests are around 5% faster while being 7% smaller. No non-test code is touched.
This commit is contained in:
1 parent
ce7364e215
commit
8abda62312
388 files changed
+18410
-29561
No files matched your search
@@ -27,14 +27,9 @@ func TestMemoryBroker_HasNoTopicSubscribers(t *testing.T) {
|
||||
_, cancel := b.Subscribe("topic")
|
||||
cancel()
|
||||
assert.False(t, b.HasTopicSubscribers("topic"))
|
||||
}
|
||||
|
||||
// Backend-specific: MemoryBroker prunes empty topics from its internal map so
|
||||
// idle-user entries don't accumulate.
|
||||
func TestMemoryBroker_CancelDeletesEmptyTopic(t *testing.T) {
|
||||
b := NewMemoryBroker()
|
||||
_, cancel := b.Subscribe("topic")
|
||||
cancel()
|
||||
// Backend-specific: MemoryBroker prunes empty topics from its internal map so
|
||||
// idle-user entries don't accumulate.
|
||||
b.mu.RLock()
|
||||
defer b.mu.RUnlock()
|
||||
_, present := b.subs["topic"]
|
||||
|
||||
Reference in new issue
Block a user