 for everyone.
But those people are not about being good; they are about being joined to God. They do not eat from the tree of the knowledge of good and evil, seeking to walk by laws, rules, and principles. No, they eat from the tree of life, and they are moved by the same heavenly life that mobilized Jesus the King through a life of poverty, humility, and immense power on the earth.
Those people have "it."
Others long to be joined to "it."
"It" is satisfying. "It" belongs to and comes from God.
"It" is simply paid for by dying and entering a new life.
This entry was posted in Church, Gospel, Holiness, missions, Unity. Bookmark the permalink.
'It' sounds good! I wonder if I have it……I certainly want more of it at any rate.
Amen! I hope my life says, and our lives say, "I found It!", more and more every day, to everyone who honestly looks.Subject: Short term house in Drumeenagh Cottages, Castlebellingham, Co. Lou...
The beautiful 18th Century Drummeenagh House and 4-Star-Cottages have recently been extensively renovated and fully equipped to the highest standard. Castlebellingham is just 6 miles from Dundalk and is a village with all amenities.
Each cottage sleeps 4/5 people and opens out onto a pretty lawn garden with views over the adjoining countryside. Outside seating, garden furniture and barbeque is provided.
The location is ideal of golfing breaks with 9 excellent golf courses in the region including the world famous "Baltray" links.
package processor

import (
	"context"
	"errors"
	"fmt"
	"github.com/stretchr/testify/assert"
	"github.com/viant/afs"
	"github.com/viant/afs/file"
	"github.com/viant/assertly"
	"github.com/viant/tapper/config"
	"github.com/viant/toolbox"
	"sort"
	"strings"
	"sync/atomic"
	"testing"
	"time"
)

func TestService_Process(t *testing.T) {
	useCases := []struct {
		ctx              context.Context
		description      string
		config           *Config
		request          *Request
		expectedResponse string
		expectedData     string
		Processor
		expectedRetryData string
	}{
		{
			description: "Summing up numbers concurrently",
			config: &Config{Concurrency: 5,
				DestinationURL: "mem://localhost/dest/sum-$UUID.txt",
				MaxExecTimeMs:  2000,
				RetryURL:       "mem://localhost/tmp/retry/",
				FailedURL:      "mem://localhost/tmp/failed/",
			},
			Processor: &sumProcessor{fs: afs.New()},
			ctx:       context.Background(),
			request: NewRequest(strings.NewReader(`1
2
3
4
5
6
7
8
9
0`), nil, "mem://localhost/output/data/numbers.txt"),
			expectedResponse: `{"Status":"ok", "Processed":10,"Destination":{ "URL" : "/mem://localhost/dest/sum/" }}`,
			expectedData:     "45",
		},

		{
			description: "Summing up numbers concurrently in batches",
			config: &Config{Concurrency: 5,
				DestinationURL: "mem://localhost/dest/sum-$UUID.txt",
				MaxExecTimeMs:  2000,
				BatchSize:      1,
				RetryURL:       "mem://localhost/tmp/retry/",
				FailedURL:      "mem://localhost/tmp/failed/",
				Destination: &config.Stream{
					URL:          "mem://localhost/dest/sum-$UUID.txt",
					StreamUpload: false,
				},
			},
			Processor: &sumProcessor{fs: afs.New()},
			ctx:       context.Background(),
			request: NewRequest(strings.NewReader(`1
2
3
4
5
6
7
8
9
0`), nil, "mem://localhost/output/data/numbers.txt"),
			expectedResponse: `{"Status":"ok", "Processed":10,"Destination":{ "URL" : "/mem://localhost/dest/sum/" }}`,
			expectedData:     "45",
		},
		{
			description: "Summing up numbers concurrently with deadline ",
			config: &Config{Concurrency: 5,
				DestinationURL:      "mem://localhost/dest/sum.txt",
				DeadlineReductionMs: 500,
				MaxExecTimeMs:       2000,
				RetryURL:            "mem://localhost/tmp/replay/",
				FailedURL:           "mem://localhost/tmp/failed/",
			},
			Processor: &sumProcessor{
				fs:            afs.New(),
				sleepOnNumber: 8,
				sleepTime:     5 * time.Second,
			},
			ctx: context.Background(),
			request: NewRequest(strings.NewReader(`1
2
3
4
5
6
7
8
9
0`), nil, "mem://localhost/output/data/numbers.txt"),
			expectedResponse:  `{"Status":"ok|retry", "Processed":9,"Destination":{ "URL" : "/mem://localhost/dest/sum/"}, "RetriableErrors":1 }`,
			expectedData:      "37",
			expectedRetryData: "8",
		},

		{
			description: "Summing ordered  number ",
			config: &Config{Concurrency: 5,
				DestinationURL:      "mem://localhost/dest/sum.txt",
				DeadlineReductionMs: 500,
				MaxExecTimeMs:       200000,
				RetryURL:            "mem://localhost/tmp/replay/",
				FailedURL:           "mem://localhost/tmp/failed/",
				Sort: Sort{
					Spec: Spec{Format: "csv"},
					By: []Field{
						{
							Index: 0,
						},
					},
					Batch: true,
				},
			},
			Processor: &sumProcessor{
				fs: afs.New(),
			},
			ctx: context.Background(),
			request: NewRequest(strings.NewReader(`1
1
1
1
2
2
2
1
3
3
3
1`), nil, "mem://localhost/output/data/numbers.txt"),
			expectedResponse: `{"Status":"ok", "Processed":3,"Destination":{ "URL" : "/mem://localhost/dest/sum/" }}`,
			expectedData:     "21",
		},

		{
			description: "Summing groupped number ",
			config: &Config{Concurrency: 5,
				DestinationURL:      "mem://localhost/dest/sum.txt",
				DeadlineReductionMs: 500,
				MaxExecTimeMs:       200000,
				RetryURL:            "mem://localhost/tmp/replay/",
				FailedURL:           "mem://localhost/tmp/failed/",
				Sort: Sort{
					Spec: Spec{Format: "csv"},
					By: []Field{
						{
							Index: 0,
						},
					},
					Batch: true,
				},
				BatchSize: 3,
			},
			Processor: &sumProcessor{
				fs: afs.New(),
			},
			ctx: context.Background(),
			request: NewRequest(strings.NewReader(`1
1
1
1
2
2
2
1
3
3
3
1`), nil, "mem://localhost/output/data/numbers.txt"),
			expectedResponse: `{"Status":"ok", "Processed":4,"Destination":{ "URL" : "/mem://localhost/dest/sum/" }}`,
			expectedData:     "21",
		},

		{
			description: "Summing up numbers concurrently with deadline plus fail retry",
			config: &Config{Concurrency: 5,
				DestinationURL:      "mem://localhost/dest/sum.txt",
				DeadlineReductionMs: 500,
				MaxExecTimeMs:       2000,
				RetryURL:            "mem://localhost/tmp/retry/",
				MaxRetries:          5,
				FailedURL:           "mem://localhost/tmp/failed/",
			},
			Processor: &sumProcessor{
				fs:            afs.New(),
				sleepOnNumber: 8,
				sleepTime:     5 * time.Second,
			},
			ctx: context.Background(),
			request: NewRequest(strings.NewReader(`