Fix eunit test failures related to min file position
This commit is contained in:
parent
e63db8dedc
commit
24f8cb21a2
2 changed files with 2 additions and 2 deletions
|
@ -21,7 +21,7 @@
|
||||||
%% @doc Now 4GiBytes, could be up to 64bit due to PB message limit of
|
%% @doc Now 4GiBytes, could be up to 64bit due to PB message limit of
|
||||||
%% chunk size
|
%% chunk size
|
||||||
-define(DEFAULT_MAX_FILE_SIZE, ((1 bsl 32) - 1)).
|
-define(DEFAULT_MAX_FILE_SIZE, ((1 bsl 32) - 1)).
|
||||||
-define(MINIMUM_OFFSET, 0).
|
-define(MINIMUM_OFFSET, 1024).
|
||||||
|
|
||||||
%% 0th draft of checksum typing with 1st byte.
|
%% 0th draft of checksum typing with 1st byte.
|
||||||
-define(CSUM_TAG_NONE, 0). % No csum provided by client
|
-define(CSUM_TAG_NONE, 0). % No csum provided by client
|
||||||
|
|
|
@ -239,7 +239,7 @@ init({FluName, Filename, DataDir}) ->
|
||||||
data_filehandle = FHd,
|
data_filehandle = FHd,
|
||||||
csum_table = CsumTable,
|
csum_table = CsumTable,
|
||||||
tref = Tref,
|
tref = Tref,
|
||||||
eof_position = Eof,
|
eof_position = erlang:max(Eof, ?MINIMUM_OFFSET),
|
||||||
max_file_size = machi_config:max_file_size()},
|
max_file_size = machi_config:max_file_size()},
|
||||||
lager:debug("Starting file proxy ~p for filename ~p, state = ~p, Eof = ~p",
|
lager:debug("Starting file proxy ~p for filename ~p, state = ~p, Eof = ~p",
|
||||||
[self(), Filename, St, Eof]),
|
[self(), Filename, St, Eof]),
|
||||||
|
|
Loading…
Reference in a new issue