mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 22:46:38 +08:00
3a05e7f09c
Restore NextUint64ID() to uint64-only API so callers need no error checks. Retry logic stays in idgen; after 3 negative values it panics instead of returning 0, preventing silent NULL primary keys.
15 lines
230 B
Go
15 lines
230 B
Go
// Copyright 2026 Arctel.net
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package idgen
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNextUint64ID(t *testing.T) {
|
|
id := NextUint64ID()
|
|
assert.NotZero(t, id)
|
|
} |