package datasource

import (
	"strconv"
	"testing"
)

func TestProducer(t *testing.T) {
	p := NewKafkaProducer("127.0.0.1:9092", "test")

	err := p.Init()
	if err != nil {
		t.Error(err)
	}

	for i := 0; i < 10000000; i++ {
		p.SendMessage(strconv.Itoa(i))
	}

	defer p.Close()
}
