processor/helpers_test.go GO 27 lines View on github.com → Search inside
1// SPDX-License-Identifier: MIT23package processor45import (6	"testing"7	"time"8)910func TestMakeTimestampNano(t *testing.T) {11	res := makeTimestampNano()12	time.Sleep(5 * time.Nanosecond)1314	if res == makeTimestampNano() {15		t.Error("Should not match")16	}17}1819func TestMakeTimestampMilli(t *testing.T) {20	res := makeTimestampMilli()21	time.Sleep(5 * time.Millisecond)2223	if res == makeTimestampMilli() {24		t.Error("Should not match")25	}26}

Code quality findings 2

Fixed delays can mask issues; prefer timers or channels for synchronization
info correctness time-sleep
time.Sleep(5 * time.Nanosecond)
Fixed delays can mask issues; prefer timers or channels for synchronization
info correctness time-sleep
time.Sleep(5 * time.Millisecond)

Get this view in your editor

Same data, no extra tab — call code_get_file + code_get_findings over MCP from Claude/Cursor/Copilot.