timer library on Arduino DUE
You are trying to print 6 characters ("test\r\n"), i.e. 60 bits
including the start and stop bits, 1000 times per second. This requires
a baud rate of at least 60&nbsp;kbit/s, yet the serial port has been
configured for only 9.6&nbsp;kbit/s. Something has to give...

As Mikael Patel wrote in a comment, it is generally inadvisable to
Serial.print() from within an ISR. It is supposed to work, though, as
long as you don't fill the Serial output buffer. The problem is that
your code does fill the buffer, as it is writing to it faster than the
UART can empty it. Once the buffer is full, the program will
malfunction.