Commit Graph

15 Commits

Author SHA1 Message Date
Brad Fitzpatrick 66f0ddac0e pkg/client: fix directory upload deadlock, clean up HTTP handling
Unexports pkg/client.Client.TransportForConfig in the process.

Fixes camlistore/camlistore#662

Change-Id: Ifc2d6b0fee70d5db86654897d2d377b343b6d38b
2015-12-29 23:39:29 -08:00
mpl da4b48926c camput file: move chanworker code to an internal chanworker pkg
First one of a series to refactor files.go

Change-Id: I4ec775674bca07c641d88f8392b2a03bb4c6fa7b
2015-03-30 17:51:18 +02:00
Brad Fitzpatrick bf35e5f011 camput: fix camput blob from stdin
Change-Id: Ic9997c408e1241e16dd4470b3f733ef3fb4f79c9
2014-02-25 14:34:26 -08:00
Brad Fitzpatrick 897591a444 camput: hermetic client config for test
Change-Id: I3c77b500da2d445851b0d8383a11e7f0942b2ff2
2014-02-23 10:59:41 -08:00
Brad Fitzpatrick ccacf76451 camput: re-enable deadlock test, now that it's fixed
And tweak limits a bit lower.

Change-Id: I7a38ffce37a997aa6ce9943e13605e76476f5646
2014-02-21 15:38:21 -08:00
Tamás Gulácsi 89fc2bb83e camput: limit upload concurrency (number of goroutines)
Use separate workers for directory uploads.
Limit upload concurrency to 3+2+3 (normal+directories+stat)
goroutines on Android, and 10+5+10 otherwise.

Thanks to the predictably failing test (1333551)
which we can test against, we can eliminate the need for
unbounded number of upload goroutines (see ee4550b).

Change-Id: Idac4c94b7d7ec4fc6c6a77fed111e0ece0843545
2014-02-21 21:31:13 +01:00
Brad Fitzpatrick 85e2e5e301 Fix crash with "go test -v -cpu=1,1 ./cmd/camput/"
Don't double-register the help flag. Only affects tests run twice, like above.

Change-Id: Ia235f2e2aa4a70e3b5a5c6fe21d8add90069664f
2014-02-21 10:59:34 -08:00
Brad Fitzpatrick 1333551de1 camput: predictably-failing disabled deadlock test
Change-Id: Ibf0877ac1b4e32ad32fe9592c487915130f9f488
2014-02-20 12:08:03 -08:00
Brad Fitzpatrick dfd94e505d camput: start of a deadlock test
Currently disabled until it's working reliably. See comments in code.

Much of this is from Tamás Gulácsi in https://camlistore-review.googlesource.com/#/c/2128/

Change-Id: I2fe2abfdee98584c698a2ac52202f13dda9beef2
2014-02-19 00:07:28 -08:00
Brad Fitzpatrick b023265043 camput: configurable timeout on env
Change-Id: Iffd0b404e48e4fd5235c22bdd00ad22c564fb0a0
2014-02-18 23:58:09 -08:00
Brad Fitzpatrick 1509f266be camput: set os.Args from env.Run.args before test's cmdmain.Main runs
Not required now, but will be for future tests.

Change-Id: I50c469d4f4fa589494036f306c25fe60914fb902
2014-02-18 18:47:11 -08:00
mpl 3a21c89712 camput: fix test. Add descriptions for better help.
Change-Id: I9016fca1dcf36ca5908947e84a5251bf587a83a7
2013-02-26 21:08:24 +01:00
mpl 202c45a04a camput file:
This change introduces 2 features, illustrated by those examples:
1) camput file -filenodes *.jpg
This was not previously possible because -filenodes option only worked
with directories.
2) camput file -filenodes -tag 'nice pics' /media/foo/DCIM/
This was not previously possible because the -tag option could only be
used with the -permanode option.

Change-Id: I80ed95fdc819d359cacfe97ba3b7849b96e406f4
2012-10-22 19:25:56 +02:00
Brad Fitzpatrick 6be58c9ce0 camput: start of proper tests
Change-Id: Icc9257154fecaaf2018971ab94e0dc54086d3719
2012-10-21 14:14:51 -07:00
Brad Fitzpatrick 0714a463c9 Update from r60 to [almost] Go 1.
A lot is still broken, but most stuff at least compiles now.

The directory tree has been rearranged now too.  Go libraries are now
under "pkg".  Fully qualified, they are e.g. "camlistore.org/pkg/jsonsign".

The go tool cannot yet fetch from arbitrary domains, but discussion is
happening now on which mechanism to use to allow that.

For now, put the camlistore root under $GOPATH/src.  Typically $GOPATH
is $HOME, so Camlistore should be at $HOME/src/camlistore.org.

Then you can:

$ go build ./server/camlistored

... etc

The build.pl script is currently disabled.  It'll be resurrected at
some point, but with a very different role (helping create a fake
GOPATH and running the go build command, if things are installed at
the wrong place, and/or running fileembed generators).

Many things are certainly broken.

Many things are disabled.  (MySQL, all indexing, etc).

Many things need to be moved into
camlistore.org/third_party/{code.google.com,github.com} and updated
from their r60 to Go 1 versions, where applicable.

The GoMySQL stuff should be updated to use database/sql and the ziutek
library implementing database/sql/driver.

Help wanted.

Change-Id: If71217dc5c8f0e70dbe46e9504ca5131c6eeacde
2012-02-18 21:53:06 -08:00