mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-16 00:53:58 -05:00
moved authgpg fake module to tests folder
fixed ficachetest and fimontest makefile update for serialiser for previous revision git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4321 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f3fbac7d77
commit
f12d2c46bc
10 changed files with 117 additions and 57 deletions
|
|
@ -17,7 +17,7 @@ static int test_fill(ftFileCreator *creator);
|
|||
int main()
|
||||
{
|
||||
/* use ftcreator to create a file on tmp drive */
|
||||
ftFileCreator fcreator("/tmp/rs-ftfc-test.dta",100000,"hash");
|
||||
ftFileCreator fcreator("/tmp/rs-ftfc-test.dta",100000,"hash", false);
|
||||
|
||||
test_timeout(&fcreator);
|
||||
test_fill(&fcreator);
|
||||
|
|
@ -32,7 +32,7 @@ int test_timeout(ftFileCreator *creator)
|
|||
{
|
||||
uint32_t chunk = 1000;
|
||||
uint64_t offset = 0;
|
||||
int max_timeout = 30;
|
||||
int max_timeout = 5;
|
||||
int max_offset = chunk * max_timeout;
|
||||
int i;
|
||||
std::cerr << "60 second test of chunk queue.";
|
||||
|
|
@ -48,7 +48,7 @@ int test_timeout(ftFileCreator *creator)
|
|||
std::cerr << "Allocated Offset: " << offset << " chunk: " << chunk << std::endl;
|
||||
|
||||
CHECK(offset <= max_offset);
|
||||
sleep(1);
|
||||
// sleep(1);
|
||||
}
|
||||
|
||||
std::cerr << "Expect Repeats now";
|
||||
|
|
@ -56,7 +56,7 @@ int test_timeout(ftFileCreator *creator)
|
|||
|
||||
for(i = 0; i < max_timeout; i++)
|
||||
{
|
||||
sleep(1);
|
||||
// sleep(1);
|
||||
creator->getMissingChunk(peer_id, size_hint, offset, chunk, toOld);
|
||||
std::cerr << "Allocated Offset: " << offset << " chunk: " << chunk << std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ int main()
|
|||
}
|
||||
}
|
||||
|
||||
ftFileCreator *creator = new ftFileCreator(filename, size, "hash");
|
||||
ftFileCreator *creator = new ftFileCreator(filename, size, "hash", true);
|
||||
for(offset = 0; offset != size; offset += chunk)
|
||||
{
|
||||
if (!creator->addFileData(offset, chunk, data))
|
||||
|
|
@ -49,7 +49,7 @@ int main()
|
|||
std::cerr << std::endl;
|
||||
|
||||
/* load it with file provider */
|
||||
creator = new ftFileCreator(filename2, size, "hash");
|
||||
creator = new ftFileCreator(filename2, size, "hash", true);
|
||||
ftFileProvider *provider = new ftFileProvider(filename, size, "hash");
|
||||
|
||||
/* create duplicate with file creator */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue