Skip to content

Commit

Permalink
updated config file
Browse files Browse the repository at this point in the history
  • Loading branch information
anjaliagg9791 committed Oct 6, 2023
1 parent 85cd9f7 commit 81fcc1c
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions compass.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ newrelic:

elasticsearch:
brokers: http://localhost:9200
request_timeout_in_seconds: 10s
request_timeout: 10s

db:
host: localhost
Expand All @@ -47,7 +47,7 @@ db:
service:
host: localhost
port: 8080
request_timeout_in_seconds: 10s
request_timeout: 10s
identity:
headerkey_uuid: Compass-User-UUID
headerkey_email: Compass-User-Email
Expand All @@ -56,7 +56,7 @@ service:
port: 8081
max_send_msg_size: 33554432
max_recv_msg_size: 33554432
request_timeout_in_seconds: 5s
request_timeout: 5s

worker:
enabled: true
Expand Down
20 changes: 10 additions & 10 deletions internal/store/elasticsearch/discovery_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestDiscoveryRepositoryUpsert(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
err = repo.Upsert(ctx, asset.Asset{
ID: "",
Type: asset.TypeTable,
Expand All @@ -50,7 +50,7 @@ func TestDiscoveryRepositoryUpsert(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
err = repo.Upsert(ctx, asset.Asset{
ID: "sample-id",
Type: asset.Type("unknown-type"),
Expand All @@ -69,7 +69,7 @@ func TestDiscoveryRepositoryUpsert(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

// upsert with create_time as a object
err = repo.Upsert(ctx, asset.Asset{
Expand Down Expand Up @@ -129,7 +129,7 @@ func TestDiscoveryRepositoryUpsert(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
err = repo.Upsert(ctx, ast)
assert.NoError(t, err)

Expand Down Expand Up @@ -178,7 +178,7 @@ func TestDiscoveryRepositoryUpsert(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

err = repo.Upsert(ctx, existingAsset)
assert.NoError(t, err)
Expand Down Expand Up @@ -219,7 +219,7 @@ func TestDiscoveryRepositoryDeleteByID(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
err = repo.DeleteByID(ctx, "")
assert.ErrorIs(t, err, asset.ErrEmptyID)
})
Expand All @@ -241,7 +241,7 @@ func TestDiscoveryRepositoryDeleteByID(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

err = repo.Upsert(ctx, ast)
require.NoError(t, err)
Expand Down Expand Up @@ -288,7 +288,7 @@ func TestDiscoveryRepositoryDeleteByID(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

err = repo.Upsert(ctx, ast1)
require.NoError(t, err)
Expand Down Expand Up @@ -319,7 +319,7 @@ func TestDiscoveryRepositoryDeleteByURN(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

t.Run("should return error if the given urn is empty", func(t *testing.T) {
err = repo.DeleteByURN(ctx, "")
Expand Down Expand Up @@ -378,7 +378,7 @@ func TestDiscoveryRepositoryDeleteByURN(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

err = repo.Upsert(ctx, ast1)
require.NoError(t, err)
Expand Down
10 changes: 5 additions & 5 deletions internal/store/elasticsearch/discovery_search_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestSearcherSearch(t *testing.T) {
err = loadTestFixture(cli, esClient, "./testdata/search-test-fixture.json")
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

type expectedRow struct {
Type string
Expand Down Expand Up @@ -388,7 +388,7 @@ func TestSearcherSuggest(t *testing.T) {
err = loadTestFixture(cli, esClient, "./testdata/suggest-test-fixture.json")
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

t.Run("fixtures", func(t *testing.T) {
testCases := []struct {
Expand Down Expand Up @@ -425,7 +425,7 @@ func loadTestFixture(cli *elasticsearch.Client, esClient *store.Client, filePath

ctx := context.TODO()
for _, testdata := range data {
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
for _, ast := range testdata.Assets {
if err := repo.Upsert(ctx, ast); err != nil {
return err
Expand Down Expand Up @@ -453,7 +453,7 @@ func TestGroupAssets(t *testing.T) {
)
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)
_, err = repo.GroupAssets(ctx, asset.GroupConfig{
GroupBy: []string{""},
})
Expand All @@ -474,7 +474,7 @@ func TestGroupAssets(t *testing.T) {
err = loadTestFixture(cli, esClient, "./testdata/search-test-fixture.json")
require.NoError(t, err)

repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Duration(10)*time.Second)
repo := store.NewDiscoveryRepository(esClient, log.NewNoop(), time.Second*10)

type groupTest struct {
Description string
Expand Down

0 comments on commit 81fcc1c

Please sign in to comment.